How to Create a Data Format for Apache Camel

import java.io.InputStream;
import java.io.OutputStream;

import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.spi.DataFormat;

public final class SampleDataFormat implements DataFormat {

   public void marshal(final Exchange exchange, final Object graph, final OutputStream stream) throws Exception {
   }

   public Object unmarshal(final Exchange exchange, final InputStream stream) throws Exception {
     return null;
   }

}

http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/org/apache/camel/spi/DataFormat.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s