|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.syndication.io.FeedInput
Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C DOM Document or JDom DOcument) into an AbstractFeed (RSS/Atom).
It accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. Parsers are plugable (they must implement the FeedParser interface).
The FeedInput useds liberal parsers.
Constructor Summary | |
FeedInput(boolean validate)
Creates a FeedInput instance. |
Method Summary | |
AbstractFeed |
build(org.w3c.dom.Document document)
Builds an AbstractFeed (RSS or Atom) from an W3C DOM document. |
AbstractFeed |
build(org.jdom.Document document)
Builds an AbstractFeed (RSS or Atom) from an JDOM document. |
AbstractFeed |
build(java.io.File file)
Builds an AbstractFeed (RSS or Atom) from a file. |
AbstractFeed |
build(org.xml.sax.InputSource is)
Builds an AbstractFeed (RSS or Atom) from an W3C SAX InputSource. |
AbstractFeed |
build(java.io.InputStream is)
Builds an AbstractFeed (RSS or Atom) from an InputStream. |
AbstractFeed |
build(java.io.Reader reader)
Builds an AbstractFeed (RSS or Atom) from an Reader. |
static java.util.List |
getSupportedFeedTypes()
Returns the list of supported input feed types. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FeedInput(boolean validate)
validate
- indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen)Method Detail |
public static java.util.List getSupportedFeedTypes()
for details on the format of these strings.
public AbstractFeed build(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException, java.lang.IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed FeedInput#build(org.jdom.Document)'.
file
- file to read to create the AbstractFeed.
java.io.FileNotFoundException
- thrown if the file could not be found.
java.io.IOException
- thrown if there is problem reading the file.
java.lang.IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic AbstractFeed build(java.io.InputStream is) throws java.lang.IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed FeedInput#build(org.jdom.Document)'.
is
- InputStream to read to create the AbstractFeed.
java.lang.IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic AbstractFeed build(java.io.Reader reader) throws java.lang.IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed FeedInput#build(org.jdom.Document)'.
reader
- Reader to read to create the AbstractFeed.
java.lang.IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic AbstractFeed build(org.xml.sax.InputSource is) throws java.lang.IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed FeedInput#build(org.jdom.Document)'.
is
- W3C SAX InputSource to read to create the AbstractFeed.
java.lang.IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic AbstractFeed build(org.w3c.dom.Document document) throws java.lang.IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed FeedInput#build(org.jdom.Document)'.
document
- W3C DOM document to read to create the AbstractFeed.
java.lang.IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic AbstractFeed build(org.jdom.Document document) throws java.lang.IllegalArgumentException, FeedException
NOTE: All other build methods delegate to this method.
document
- JDOM document to read to create the AbstractFeed.
java.lang.IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |