⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rssfeedimpl.java

📁 java 文件下载器。可自定义
💻 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:   RSSFeedImpl.java

package org.gudy.azureus2.pluginsimpl.local.utils.xml.rss;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import org.gudy.azureus2.core3.util.Debug;
import org.gudy.azureus2.plugins.utils.Utilities;
import org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader;
import org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderException;
import org.gudy.azureus2.plugins.utils.xml.rss.RSSChannel;
import org.gudy.azureus2.plugins.utils.xml.rss.RSSFeed;
import org.gudy.azureus2.plugins.utils.xml.simpleparser.*;

// Referenced classes of package org.gudy.azureus2.pluginsimpl.local.utils.xml.rss:
//			RSSChannelImpl

public class RSSFeedImpl
	implements RSSFeed
{

	private boolean is_atom;
	private RSSChannel channels[];

	public RSSFeedImpl(Utilities utilities, ResourceDownloader downloader)
		throws ResourceDownloaderException, SimpleXMLParserDocumentException
	{
		this(utilities, downloader.download());
	}

	public RSSFeedImpl(Utilities utilities, InputStream is)
		throws SimpleXMLParserDocumentException
	{
		SimpleXMLParserDocument doc = utilities.getSimpleXMLParserDocumentFactory().create(is);
		String doc_name = doc.getName();
		is_atom = doc_name != null && doc_name.equalsIgnoreCase("feed");
		List chans = new ArrayList();
		if (is_atom)
		{
			chans.add(new RSSChannelImpl(doc, true));
		} else
		{
			SimpleXMLParserDocumentNode xml_channels[] = doc.getChildren();
			for (int i = 0; i < xml_channels.length; i++)
			{
				SimpleXMLParserDocumentNode xml_channel = xml_channels[i];
				String name = xml_channel.getName().toLowerCase();
				if (name.equals("channel"))
					chans.add(new RSSChannelImpl(xml_channel, false));
			}

		}
		channels = new RSSChannel[chans.size()];
		chans.toArray(channels);
		try
		{
			is.close();
		}
		catch (Throwable e)
		{
			Debug.printStackTrace(e);
		}
		break MISSING_BLOCK_LABEL_217;
		Exception exception;
		exception;
		try
		{
			is.close();
		}
		catch (Throwable e)
		{
			Debug.printStackTrace(e);
		}
		throw exception;
	}

	public boolean isAtomFeed()
	{
		return is_atom;
	}

	public RSSChannel[] getChannels()
	{
		return channels;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -