📄 test.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: Test.java
package org.gudy.azureus2.pluginsimpl.local.utils.xml.rss;
import java.io.PrintStream;
import java.net.URL;
import java.util.Properties;
import org.gudy.azureus2.core3.util.*;
import org.gudy.azureus2.plugins.*;
import org.gudy.azureus2.plugins.utils.Utilities;
import org.gudy.azureus2.plugins.utils.xml.rss.*;
import org.gudy.azureus2.plugins.utils.xml.simpleparser.SimpleXMLParserDocumentNode;
public class Test
implements Plugin
{
private static AESemaphore init_sem = new AESemaphore("RSSTester");
private static AEMonitor class_mon = new AEMonitor("RSSTester");
private static Test singleton;
protected PluginInterface plugin_interface;
public Test()
{
}
public static Test getSingleton()
{
Test test;
class_mon.enter();
if (singleton == null)
{
(new AEThread("plugin initialiser") {
public void runSupport()
{
PluginManager.registerPlugin(org/gudy/azureus2/pluginsimpl/local/utils/xml/rss/Test);
Properties props = new Properties();
props.put("MULTI_INSTANCE", "true");
PluginManager.startAzureus(1, props);
}
}).start();
init_sem.reserve();
}
test = singleton;
class_mon.exit();
return test;
Exception exception;
exception;
class_mon.exit();
throw exception;
}
public void initialize(PluginInterface _pi)
{
plugin_interface = _pi;
singleton = this;
init_sem.release();
try
{
RSSFeed feed = plugin_interface.getUtilities().getRSSFeed(new URL("http://aelitis.com:7979/rss_feed.xml"));
RSSChannel channels[] = feed.getChannels();
for (int i = 0; i < channels.length; i++)
{
RSSChannel channel = channels[i];
System.out.println((new StringBuilder()).append("chan: title = ").append(channel.getTitle()).append(", desc = ").append(channel.getDescription()).append(", link = ").append(channel.getLink()).append(", pub = ").append(channel.getPublicationDate()).toString());
RSSItem items[] = channel.getItems();
for (int j = 0; j < items.length; j++)
{
RSSItem item = items[j];
System.out.println((new StringBuilder()).append(" item:").append(item.getTitle()).append(", desc = ").append(item.getDescription()).append(", link = ").append(item.getLink()).toString());
SimpleXMLParserDocumentNode node = item.getNode();
System.out.println((new StringBuilder()).append(" [hash] ").append(node.getChild("torrent_sha1").getValue()).toString());
System.out.println((new StringBuilder()).append(" [size] ").append(node.getChild("torrent_size").getValue()).toString());
System.out.println((new StringBuilder()).append(" [seed] ").append(node.getChild("torrent_seeders").getValue()).toString());
System.out.println((new StringBuilder()).append(" [leec] ").append(node.getChild("torrent_leechers").getValue()).toString());
}
}
}
catch (Throwable e)
{
e.printStackTrace();
}
}
public static void main(String args[])
{
getSingleton();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -