| java.lang.Object com.sun.syndication.io.WireFeedOutput
WireFeedOutput | public class WireFeedOutput (Code) | | Generates an XML document (String, File, OutputStream, Writer, W3C DOM document or JDOM document)
out of an WireFeed (RSS/Atom).
It generates all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and
Atom 0.3 feeds. Generators are plugable (they must implement the ModuleParser interface).
author: Alejandro Abdelnur |
Constructor Summary | |
public | WireFeedOutput() Creates a FeedOuput instance. |
Method Summary | |
public static List | getSupportedFeedTypes() Returns the list of supported output feed types. | public void | output(WireFeed feed, File file) Creates a File containing with the XML representation for the given WireFeed.
If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. | public void | output(WireFeed feed, Writer writer) Writes to an Writer the XML representation for the given WireFeed.
If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. | public Document | outputJDom(WireFeed feed) Creates a JDOM document for the given WireFeed.
This method does not use the feed encoding property.
NOTE: All other output methods delegate to this method.
Parameters: feed - Abstract feed to create JDOM document from. | public String | outputString(WireFeed feed) Creates a String with the XML representation for the given WireFeed.
If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. | public org.w3c.dom.Document | outputW3CDom(WireFeed feed) Creates a W3C DOM document for the given WireFeed.
This method does not use the feed encoding property.
NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
Parameters: feed - Abstract feed to create W3C DOM document from. |
WireFeedOutput | public WireFeedOutput()(Code) | | Creates a FeedOuput instance.
|
getSupportedFeedTypes | public static List getSupportedFeedTypes()(Code) | | Returns the list of supported output feed types.
See Also: WireFeed See Also: for details on the format of these strings. See Also: a list of String elements with the supported output feed types. |
output | public void output(WireFeed feed, File file) throws IllegalArgumentException, IOException, FeedException(Code) | | Creates a File containing with the XML representation for the given WireFeed.
If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. The platform
default charset encoding is used to write the feed to the file. It is the responsibility
of the developer to ensure the feed encoding is set to the platform charset encoding.
NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
Parameters: feed - Abstract feed to create XML representation from. The type of the WireFeed must matchthe type given to the FeedOuptut constructor. Parameters: file - the file where to write the XML representation for the given WireFeed. throws: IllegalArgumentException - thrown if the feed type of the WireFeedOutput and WireFeed don't match. throws: IOException - thrown if there was some problem writing to the File. throws: FeedException - thrown if the XML representation for the feed could not be created. |
output | public void output(WireFeed feed, Writer writer) throws IllegalArgumentException, IOException, FeedException(Code) | | Writes to an Writer the XML representation for the given WireFeed.
If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is the responsibility
of the developer to ensure the Writer instance is using the same charset encoding.
NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
Parameters: feed - Abstract feed to create XML representation from. The type of the WireFeed must matchthe type given to the FeedOuptut constructor. Parameters: writer - Writer to write the XML representation for the given WireFeed. throws: IllegalArgumentException - thrown if the feed type of the WireFeedOutput and WireFeed don't match. throws: IOException - thrown if there was some problem writing to the Writer. throws: FeedException - thrown if the XML representation for the feed could not be created. |
outputJDom | public Document outputJDom(WireFeed feed) throws IllegalArgumentException, FeedException(Code) | | Creates a JDOM document for the given WireFeed.
This method does not use the feed encoding property.
NOTE: All other output methods delegate to this method.
Parameters: feed - Abstract feed to create JDOM document from. The type of the WireFeed must matchthe type given to the FeedOuptut constructor. the JDOM document for the given WireFeed. throws: IllegalArgumentException - thrown if the feed type of the WireFeedOutput and WireFeed don't match. throws: FeedException - thrown if the JDOM document for the feed could not be created. |
outputString | public String outputString(WireFeed feed) throws IllegalArgumentException, FeedException(Code) | | Creates a String with the XML representation for the given WireFeed.
If the feed encoding is not NULL, it will be used in the XML prolog encoding attribute. It is the responsibility
of the developer to ensure that if the String is written to a character stream the stream charset is the same as
the feed encoding property.
NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
Parameters: feed - Abstract feed to create XML representation from. The type of the WireFeed must matchthe type given to the FeedOuptut constructor. a String with the XML representation for the given WireFeed. throws: IllegalArgumentException - thrown if the feed type of the WireFeedOutput and WireFeed don't match. throws: FeedException - thrown if the XML representation for the feed could not be created. |
outputW3CDom | public org.w3c.dom.Document outputW3CDom(WireFeed feed) throws IllegalArgumentException, FeedException(Code) | | Creates a W3C DOM document for the given WireFeed.
This method does not use the feed encoding property.
NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
Parameters: feed - Abstract feed to create W3C DOM document from. The type of the WireFeed must matchthe type given to the FeedOuptut constructor. the W3C DOM document for the given WireFeed. throws: IllegalArgumentException - thrown if the feed type of the WireFeedOutput and WireFeed don't match. throws: FeedException - thrown if the W3C DOM document for the feed could not be created. |
|
|