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);
}
}