Top Description Fields Constructors Methods
com.rometools.rome.io

public Class SyndFeedOutput

extends Object
Class Inheritance
Imports
java.io.File, .IOException, .Writer, org.jdom2.Document, com.rometools.rome.feed.synd.SyndFeed

Generates an XML document (String, File, OutputStream, Writer, W3C DOM document or JDOM document) out of an SyndFeedImpl..

It delegates to a WireFeedOutput to generate all feed types.

Field Summary

Modifier and TypeField and Description
private final WireFeedOutput

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
output(final SyndFeed
Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
,
final File
the file where to write the XML representation for the given SyndFeedImpl.
file
)

Creates a File containing with the XML representation for the given SyndFeedImpl.

public void
output(final SyndFeed
Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
,
final File
the file where to write the XML representation for the given SyndFeedImpl.
file
,
final boolean
pretty-print XML (true) oder collapsed
prettyPrint
)

Creates a File containing with the XML representation for the given SyndFeedImpl.

public void
output(final SyndFeed
Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
,
final Writer
Writer to write the XML representation for the given SyndFeedImpl.
writer
)

Writes to an Writer the XML representation for the given SyndFeedImpl.

public void
output(final SyndFeed
Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
,
final Writer
Writer to write the XML representation for the given SyndFeedImpl.
writer
,
final boolean
pretty-print XML (true) oder collapsed
prettyPrint
)

Writes to an Writer the XML representation for the given SyndFeedImpl.

public Document

Returns:

the JDOM document for the given SyndFeedImpl.
outputJDom
(final SyndFeed
Abstract feed to create JDOM document from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
)

Creates a JDOM document for the given SyndFeedImpl.

public String

Returns:

a String with the XML representation for the given SyndFeedImpl.
outputString
(final SyndFeed
Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
)

Creates a String with the XML representation for the given SyndFeedImpl.

public String

Returns:

a String with the XML representation for the given SyndFeedImpl.
outputString
(final SyndFeed
Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
,
final boolean
pretty-print XML (true) oder collapsed
prettyPrint
)

Creates a String with the XML representation for the given SyndFeedImpl.

public Document

Returns:

the W3C DOM document for the given SyndFeedImpl.
outputW3CDom
(final SyndFeed
Abstract feed to create W3C DOM document from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.
feed
)

Creates a W3C DOM document for the given SyndFeedImpl.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

feedOutputback to summary
private final WireFeedOutput feedOutput

Constructor Detail

SyndFeedOutputback to summary
public SyndFeedOutput()

Method Detail

outputback to summary
public void output(final SyndFeed feed, final File file) throws IOException, FeedException

Creates a File containing with the XML representation for the given SyndFeedImpl.

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.

Parameters
feed:SyndFeed

Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

file:File

the file where to write the XML representation for the given SyndFeedImpl.

Exceptions
IOException:
thrown if there was some problem writing to the File.
FeedException:
thrown if the XML representation for the feed could not be created.
outputback to summary
public void output(final SyndFeed feed, final File file, final boolean prettyPrint) throws IOException, FeedException

Creates a File containing with the XML representation for the given SyndFeedImpl.

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.

Parameters
feed:SyndFeed

Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

file:File

the file where to write the XML representation for the given SyndFeedImpl.

prettyPrint:boolean

pretty-print XML (true) oder collapsed

Exceptions
IOException:
thrown if there was some problem writing to the File.
FeedException:
thrown if the XML representation for the feed could not be created.
outputback to summary
public void output(final SyndFeed feed, final Writer writer) throws IOException, FeedException

Writes to an Writer the XML representation for the given SyndFeedImpl.

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.

Parameters
feed:SyndFeed

Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

writer:Writer

Writer to write the XML representation for the given SyndFeedImpl.

Exceptions
IOException:
thrown if there was some problem writing to the Writer.
FeedException:
thrown if the XML representation for the feed could not be created.
outputback to summary
public void output(final SyndFeed feed, final Writer writer, final boolean prettyPrint) throws IOException, FeedException

Writes to an Writer the XML representation for the given SyndFeedImpl.

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.

Parameters
feed:SyndFeed

Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

writer:Writer

Writer to write the XML representation for the given SyndFeedImpl.

prettyPrint:boolean

pretty-print XML (true) oder collapsed

Exceptions
IOException:
thrown if there was some problem writing to the Writer.
FeedException:
thrown if the XML representation for the feed could not be created.
outputJDomback to summary
public Document outputJDom(final SyndFeed feed) throws FeedException

Creates a JDOM document for the given SyndFeedImpl.

This method does not use the feed encoding property.

Parameters
feed:SyndFeed

Abstract feed to create JDOM document from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

Returns:Document

the JDOM document for the given SyndFeedImpl.

Exceptions
FeedException:
thrown if the JDOM document for the feed could not be created.
outputStringback to summary
public String outputString(final SyndFeed feed) throws FeedException

Creates a String with the XML representation for the given SyndFeedImpl.

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.

Parameters
feed:SyndFeed

Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

Returns:String

a String with the XML representation for the given SyndFeedImpl.

Exceptions
FeedException:
thrown if the XML representation for the feed could not be created.
outputStringback to summary
public String outputString(final SyndFeed feed, final boolean prettyPrint) throws FeedException

Creates a String with the XML representation for the given SyndFeedImpl.

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.

Parameters
feed:SyndFeed

Abstract feed to create XML representation from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

prettyPrint:boolean

pretty-print XML (true) oder collapsed

Returns:String

a String with the XML representation for the given SyndFeedImpl.

Exceptions
FeedException:
thrown if the XML representation for the feed could not be created.
outputW3CDomback to summary
public Document outputW3CDom(final SyndFeed feed) throws FeedException

Creates a W3C DOM document for the given SyndFeedImpl.

This method does not use the feed encoding property.

Parameters
feed:SyndFeed

Abstract feed to create W3C DOM document from. The type of the SyndFeedImpl must match the type given to the FeedOuptut constructor.

Returns:Document

the W3C DOM document for the given SyndFeedImpl.

Exceptions
FeedException:
thrown if the W3C DOM document for the feed could not be created.