class FeedReader { SyndFeed feed; String url,description,title; int numEntries; FeedEntry entry[]; public FeedReader(String _url) { url=_url; try { feed=new SyndFeedInput().build(new XmlReader(new URL(url))); description=feed.getDescription(); title=feed.getTitle(); java.util.List entrl=feed.getEntries(); Object [] o=entrl.toArray(); numEntries=o.length; entry=new FeedEntry[numEntries]; for(int i=0; i0) contents=((SyndContentImpl)o[0]).getValue(); else contents="[No content.]"; description=entry.getDescription().getValue(); if(description.charAt(0)== System.getProperty("line.separator").charAt(0)) description=description.substring(1); url=entry.getLink(); title=entry.getTitle(); pubdate=entry.getPublishedDate(); } catch(Exception e) { println("Exception in FeedEntry: "+e.toString()); e.printStackTrace(); } } public String toString() { String s; s=""; if(description.length()>500) s+=description.substring(0,500); else s+=description; // println(s); return s; } }