org.apache.camel.dataformat.bindy.kvp
Class BindyKeyValuePairDataFormat
java.lang.Object
org.apache.camel.dataformat.bindy.BindyAbstractDataFormat
org.apache.camel.dataformat.bindy.kvp.BindyKeyValuePairDataFormat
- All Implemented Interfaces:
- DataFormat
public class BindyKeyValuePairDataFormat
- extends BindyAbstractDataFormat
A data format (
DataFormat) using Bindy to marshal to and from CSV files
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BindyKeyValuePairDataFormat
public BindyKeyValuePairDataFormat()
BindyKeyValuePairDataFormat
public BindyKeyValuePairDataFormat(String... packages)
marshal
public void marshal(Exchange exchange,
Object body,
OutputStream outputStream)
throws Exception
- Description copied from interface:
DataFormat
- Marshals the object to the given Stream.
- Parameters:
exchange - the current exchangebody - the object to be marshalledoutputStream - the output stream to write the marshalled result to
- Throws:
Exception - can be thrown
unmarshal
public Object unmarshal(Exchange exchange,
InputStream inputStream)
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.
- Parameters:
exchange - the current exchangeinputStream - the input stream with the object to be unmarshalled
- Returns:
- the unmarshalled object
- Throws:
Exception - can be thrown
createModelFactory
protected BindyAbstractFactory createModelFactory(PackageScanClassResolver resolver)
throws Exception
- Specified by:
createModelFactory in class BindyAbstractDataFormat
- Throws:
Exception
Apache CAMEL