com.sun.syndication.io
クラス WireFeedInput

java.lang.Object
  上位を拡張 com.sun.syndication.io.WireFeedInput

public class WireFeedInput
extends java.lang.Object

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.


コンストラクタの概要
WireFeedInput()
          Creates a WireFeedInput instance with input validation turned off.
WireFeedInput(boolean validate)
          Creates a WireFeedInput instance.
 
メソッドの概要
 WireFeed build(org.w3c.dom.Document document)
          Builds an WireFeed (RSS or Atom) from an W3C DOM document.
 WireFeed build(java.io.File file)
          Builds an WireFeed (RSS or Atom) from a file.
 WireFeed build(org.xml.sax.InputSource is)
          Builds an WireFeed (RSS or Atom) from an W3C SAX InputSource.
 WireFeed build(java.io.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 java.util.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.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

WireFeedInput

public WireFeedInput()
Creates a WireFeedInput instance with input validation turned off.


WireFeedInput

public WireFeedInput(boolean validate)
Creates a WireFeedInput instance.

パラメータ:
validate - indicates if the input should be validated. NOT IMPLEMENTED YET (validation does not happen)
メソッドの詳細

getSupportedFeedTypes

public static java.util.List getSupportedFeedTypes()
Returns the list of supported input feed types.

戻り値:
a list of String elements with the supported input feed types.
関連項目:
for details on the format of these strings.


setXmlHealerOn

public void setXmlHealerOn(boolean heals)
Enables XML healing in the WiredFeedInput instance.

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.

getXmlHealerOn

public boolean getXmlHealerOn()
Indicates if the WiredFeedInput instance will XML heal (if necessary) the character stream.

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.

戻り値:
TRUE if healing is enabled, FALSE if not.

build

public WireFeed build(java.io.File file)
               throws java.io.FileNotFoundException,
                      java.io.IOException,
                      java.lang.IllegalArgumentException,
                      FeedException
Builds an WireFeed (RSS or Atom) from a file.

NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.

パラメータ:
file - file to read to create the WireFeed.
戻り値:
the WireFeed read from the file.
例外:
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 parsed

build

public WireFeed build(java.io.Reader reader)
               throws java.lang.IllegalArgumentException,
                      FeedException
Builds an WireFeed (RSS or Atom) from an Reader.

NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.

パラメータ:
reader - Reader to read to create the WireFeed.
戻り値:
the WireFeed read from the Reader.
例外:
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

build

public WireFeed build(org.xml.sax.InputSource is)
               throws java.lang.IllegalArgumentException,
                      FeedException
Builds an WireFeed (RSS or Atom) from an W3C SAX InputSource.

NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.

パラメータ:
is - W3C SAX InputSource to read to create the WireFeed.
戻り値:
the WireFeed read from the W3C SAX InputSource.
例外:
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

build

public WireFeed build(org.w3c.dom.Document document)
               throws java.lang.IllegalArgumentException,
                      FeedException
Builds an WireFeed (RSS or Atom) from an W3C DOM document.

NOTE: This method delages to the 'AsbtractFeed WireFeedInput#build(org.jdom.Document)'.

パラメータ:
document - W3C DOM document to read to create the WireFeed.
戻り値:
the WireFeed read from the W3C DOM document.
例外:
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

createSAXBuilder

protected SAXBuilder createSAXBuilder()
Creates and sets up a org.jdom.input.SAXBuilder for parsing.

戻り値:
a new org.jdom.input.SAXBuilder object