net.rim.device.api.io.parser.rss
Class RSSParser

java.lang.Object
  extended by net.rim.device.api.io.parser.rss.RSSParser

public class RSSParser
extends Object

Parses an RSS XML input stream. It supports 3 different forms of RSS:

Automatically detects the format and parses appropriately. Returns a RSSChannel object representing the RSS data.

Since:
BlackBerry API 6.0.0

Constructor Summary
RSSParser()
          Constructs an RSSParser.
 
Method Summary
 RSSChannel parseRSS(InputStream is, int numItemsToParse)
          Parses the InputStream of an RSS XML document, and returns a the data in a RSSChannel.
 void parseRSS(InputStream is, int numItemsToParse, RSSEventListener listener, boolean needSynchronized)
          Parses the InputStream of an RSS XML document, and notifies the listener of RSS events.
 void stopRSSParser()
          Stops this RSSParser.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

RSSParser

public RSSParser()
Constructs an RSSParser.

Since:
BlackBerry API 6.0.0


Method Detail

parseRSS

public RSSChannel parseRSS(InputStream is,
                           int numItemsToParse)
                    throws ParserConfigurationException,
                           SAXException,
                           IOException
Parses the InputStream of an RSS XML document, and returns a the data in a RSSChannel.

Parameters:
is - The InputStream for the RSS XML document.
numItemsToParse - The number of the items to parse. If numItemsToParse is greater than 0, all items in the channel will be parsed.
Returns:
The RSS data in an RSSChannel.
Throws:
ParserConfigurationException
SAXException
IOException
Since:
BlackBerry API 6.0.0

parseRSS

public void parseRSS(InputStream is,
                     int numItemsToParse,
                     RSSEventListener listener,
                     boolean needSynchronized)
Parses the InputStream of an RSS XML document, and notifies the listener of RSS events.

Parameters:
is - The InputStream for the RSS XML document.
numItemsToParse - The number of the items to parse. If numItemsToParse is greater than 0, all items in the channel will be parsed.
listener - The RSSEventListener implmentation to receive an RSSEvent.
needSynchronized - true if this should execute in the main event loop; otherwise false.
Since:
BlackBerry API 6.0.0

stopRSSParser

public void stopRSSParser()
Stops this RSSParser.

Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal