|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.syndication.io.WireFeedInput
public class WireFeedInput
Parses an XML document (File, InputStream, Reader, W3C SAX InputSource, W3C DOM Document or JDom DOcument) into an WireFeed (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 WireFeedParser interface).
The WireFeedInput useds liberal parsers.
Constructor Summary | |
---|---|
WireFeedInput()
Creates a WireFeedInput instance with input validation turned off. |
|
WireFeedInput(boolean validate)
Creates a WireFeedInput instance. |
Method Summary | |
---|---|
WireFeed |
build(Document document)
Builds an WireFeed (RSS or Atom) from an W3C DOM document. |
WireFeed |
build(org.jdom.Document document)
Builds an WireFeed (RSS or Atom) from an JDOM document. |
WireFeed |
build(File file)
Builds an WireFeed (RSS or Atom) from a file. |
WireFeed |
build(InputSource is)
Builds an WireFeed (RSS or Atom) from an W3C SAX InputSource. |
WireFeed |
build(Reader reader)
Builds an WireFeed (RSS or Atom) from an Reader. |
protected SAXBuilder |
createSAXBuilder()
Creates and sets up a org.jdom.input.SAXBuilder for parsing. |
static List |
getSupportedFeedTypes()
Returns the list of supported input feed types. |
boolean |
getXmlHealerOn()
Indicates if the WiredFeedInput instance will XML heal (if necessary) the character stream. |
void |
setXmlHealerOn(boolean heals)
Enables XML healing in the WiredFeedInput instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WireFeedInput()
public WireFeedInput(boolean validate)
validate
- indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen)Method Detail |
---|
public static List getSupportedFeedTypes()
for details on the format of these strings.
public void setXmlHealerOn(boolean heals)
Healing trims leading chars from the stream (empty spaces and comments) until the XML prolog.
Healing resolves HTML entities (from literal to code number) in the reader.
The healing is done only with the build(File) and build(Reader) signatures.
By default is TRUE.
heals
- TRUE enables stream healing, FALSE disables it.public boolean getXmlHealerOn()
Healing trims leading chars from the stream (empty spaces and comments) until the XML prolog.
Healing resolves HTML entities (from literal to code number) in the reader.
The healing is done only with the build(File) and build(Reader) signatures.
By default is TRUE.
public WireFeed build(File file) throws FileNotFoundException, IOException, IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
file
- file to read to create the WireFeed.
FileNotFoundException
- thrown if the file could not be found.
IOException
- thrown if there is problem reading the file.
IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic WireFeed build(Reader reader) throws IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
reader
- Reader to read to create the WireFeed.
IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic WireFeed build(InputSource is) throws IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
is
- W3C SAX InputSource to read to create the WireFeed.
IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic WireFeed build(Document document) throws IllegalArgumentException, FeedException
NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.
document
- W3C DOM document to read to create the WireFeed.
IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedpublic WireFeed build(org.jdom.Document document) throws IllegalArgumentException, FeedException
NOTE: All other build methods delegate to this method.
document
- JDOM document to read to create the WireFeed.
IllegalArgumentException
- thrown if feed type could not be understood by any of the underlying parsers.
FeedException
- if the feed could not be parsedprotected SAXBuilder createSAXBuilder()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |