|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.ri.createlab.rss.RSSReader
public class RSSReader
RSSReader
can be used to generally access RSS feeds.
Constructor Summary | |
---|---|
RSSReader(String URLFeed)
Constructs the reader object by providing a URL which points to an RSS or Atom feed. |
Method Summary | |
---|---|
List<FeedEntry> |
getEntries()
Returns (a copy of) the entries in the feed (since the last update). |
List<FeedEntry> |
getEntriesPublishedAfterTimestamp(long timestamp)
Returns the entries in the feed (since the last update) which were published after the given timestamp. |
String |
getEntryAuthor(int index)
Returns the first author of the feed entry specified by index. |
int |
getEntryCount()
Returns the total number of feed entries as an int |
Date |
getEntryDate(int index)
Get the date the entry was published specified by index. |
String |
getEntryDescription(int index)
Returns the entry's text description specified by index. |
String |
getEntryLink(int index)
Returns the link to the feed entry specified by index. |
String |
getEntryTitle(int index)
Returns the title of the feed entry specified by index. |
String |
getFeedAuthor()
Returns the name of the first author of the feed as a String |
Date |
getFeedDate(int index)
Returns the date the feed was published as a Date object |
String |
getFeedDescription()
Returns a description of the feed as a String |
String |
getFeedLink()
Returns the URL of the feed as a String |
String |
getFeedTitle()
Returns the title of the feed as a String |
void |
updateFeed()
Fetches the data from the web and updates all of the feed's data |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RSSReader(String URLFeed)
URLFeed
- Holds the loction of the URL location of the RSS feed.
For example, 'http://rss.news.yahoo.com/rss/topstories'Method Detail |
---|
public void updateFeed()
public String getFeedAuthor()
public String getFeedTitle()
public String getFeedLink()
public String getFeedDescription()
public Date getFeedDate(int index)
public int getEntryCount()
public List<FeedEntry> getEntries()
public List<FeedEntry> getEntriesPublishedAfterTimestamp(long timestamp)
List
if no such entries are found. Guaranteed to not return null
.
public String getEntryAuthor(int index)
index
- Specifies which entry to get data from
IndexOutOfBoundsException
- if the given index is out of rangepublic String getEntryTitle(int index)
index
- Specifies which entry to get data from
IndexOutOfBoundsException
- if the given index is out of rangepublic String getEntryLink(int index)
index
- Specifies which entry to get data from
IndexOutOfBoundsException
- if the given index is out of rangepublic String getEntryDescription(int index)
index
- Specifies which entry to get data from
IndexOutOfBoundsException
- if the given index is out of rangepublic Date getEntryDate(int index)
index
- Specifies which entry to get data from
IndexOutOfBoundsException
- if the given index is out of range
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |