FileDocCategorySizeDatePackage
RSSFeedImpl.javaAPI DocAzureus 3.0.3.42742Wed Mar 28 15:12:08 BST 2007org.gudy.azureus2.pluginsimpl.local.utils.xml.rss

RSSFeedImpl

public class RSSFeedImpl extends Object implements org.gudy.azureus2.plugins.utils.xml.rss.RSSFeed
author
parg

Fields Summary
private org.gudy.azureus2.plugins.utils.xml.rss.RSSChannel[]
channels
Constructors Summary
public RSSFeedImpl(org.gudy.azureus2.plugins.utils.Utilities utilities, org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader downloader)

		InputStream	is = downloader.download();
		
		try{
			SimpleXMLParserDocument	doc = utilities.getSimpleXMLParserDocumentFactory().create( is );
		
			SimpleXMLParserDocumentNode[]	xml_channels = doc.getChildren();
			
			List	chans = new ArrayList();
			
			for (int i=0;i<xml_channels.length;i++){
				
				SimpleXMLParserDocumentNode	xml_channel = xml_channels[i];
				
				if ( xml_channel.getName().equalsIgnoreCase("channel")){
					
					chans.add( new RSSChannelImpl( xml_channel ));
				}
			}
			
			channels	= new RSSChannel[ chans.size()];
			
			chans.toArray( channels );
			
		}finally{
			
			try{
				is.close();
				
			}catch( Throwable e ){
				
				Debug.printStackTrace(e);
			}
		}
	
Methods Summary
public org.gudy.azureus2.plugins.utils.xml.rss.RSSChannel[]getChannels()

		return( channels );