com.macromedia.rssu
Class Generator

java.lang.Object
  extended bycom.macromedia.rssu.Generator
Direct Known Subclasses:
RdfStyleGenerator, RssStyleGenerator

public abstract class Generator
extends java.lang.Object

The generator is a base class for all the objects that will create RSS documents.

In general, a generator is the opposite of a parser, and produces RSS.


Constructor Summary
Generator()
           
 
Method Summary
 void generate(Channel channel, java.io.File file)
          Generate xml to a file.
abstract  void generate(Channel channel, java.io.OutputStream stream)
          Given a channel object we will produce a valid XML document.
 java.lang.String generateToString(Channel channel)
          Generate the xml from a channel and return it as a String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator()
Method Detail

generate

public abstract void generate(Channel channel,
                              java.io.OutputStream stream)
                       throws RssException
Given a channel object we will produce a valid XML document.

Parameters:
channel - is the object to convert to xml
stream - is where to write the xml document to
Throws:
RssException

generate

public void generate(Channel channel,
                     java.io.File file)
              throws RssException
Generate xml to a file.

Parameters:
channel - is the object to create xml from
file - is the file to write to
Throws:
RssException

generateToString

public java.lang.String generateToString(Channel channel)
                                  throws RssException
Generate the xml from a channel and return it as a String.

Parameters:
channel - is the data to render as xml
Returns:
a string of xml.
Throws:
RssException