org.apache.camel.dataformat.rss
Class RssDataFormat

java.lang.Object
  extended by org.apache.camel.dataformat.rss.RssDataFormat
All Implemented Interfaces:
DataFormat

public class RssDataFormat
extends Object
implements DataFormat

RSS DataFormat

This data format supports two operations:

Uses ROME for RSS parsing.


Field Summary
protected static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
RssDataFormat()
           
 
Method Summary
 void marshal(Exchange exchange, Object body, OutputStream out)
          Marshals the object to the given Stream.
 Object unmarshal(Exchange exchange, InputStream in)
          Unmarshals the given stream into an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final transient org.apache.commons.logging.Log LOG
Constructor Detail

RssDataFormat

public RssDataFormat()
Method Detail

marshal

public void marshal(Exchange exchange,
                    Object body,
                    OutputStream out)
             throws Exception
Description copied from interface: DataFormat
Marshals the object to the given Stream.

Specified by:
marshal in interface DataFormat
Parameters:
exchange - the current exchange
body - the object to be marshalled
out - the output stream to write the marshalled result to
Throws:
Exception - can be thrown

unmarshal

public Object unmarshal(Exchange exchange,
                        InputStream in)
                 throws Exception
Description copied from interface: DataFormat
Unmarshals the given stream into an object.

Notice: The result is set as body on the exchange OUT message. It is possible to mutate the OUT message provided in the given exchange parameter. For instance adding headers to the OUT message will be preserved.

Specified by:
unmarshal in interface DataFormat
Parameters:
exchange - the current exchange
in - the input stream with the object to be unmarshalled
Returns:
the unmarshalled object
Throws:
Exception - can be thrown


Apache CAMEL