org.apache.camel.dataformat.xstream
Class AbstractXStreamWrapper
java.lang.Object
org.apache.camel.dataformat.xstream.AbstractXStreamWrapper
- All Implemented Interfaces:
- DataFormat
- Direct Known Subclasses:
- JsonDataFormat, XStreamDataFormat
public abstract class AbstractXStreamWrapper
- extends Object
- implements DataFormat
An abstract class which implement data format
(DataFormat) interface which leverage the XStream library for XML or JSON's marshaling and unmarshaling
- Version:
- $Revision: 738604 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractXStreamWrapper
public AbstractXStreamWrapper()
AbstractXStreamWrapper
public AbstractXStreamWrapper(com.thoughtworks.xstream.XStream xstream)
getXStream
public com.thoughtworks.xstream.XStream getXStream()
setXStream
public void setXStream(com.thoughtworks.xstream.XStream xstream)
createXStream
protected com.thoughtworks.xstream.XStream createXStream()
getStaxConverter
public StaxConverter getStaxConverter()
setStaxConverter
public void setStaxConverter(StaxConverter staxConverter)
marshal
public void marshal(Exchange exchange,
Object body,
OutputStream stream)
throws Exception
- Specified by:
marshal in interface DataFormat
- Throws:
Exception
unmarshal
public Object unmarshal(Exchange exchange,
InputStream stream)
throws Exception
- Specified by:
unmarshal in interface DataFormat
- Throws:
Exception
createHierarchicalStreamWriter
protected abstract com.thoughtworks.xstream.io.HierarchicalStreamWriter createHierarchicalStreamWriter(Exchange exchange,
Object body,
OutputStream stream)
throws XMLStreamException
- Throws:
XMLStreamException
createHierarchicalStreamReader
protected abstract com.thoughtworks.xstream.io.HierarchicalStreamReader createHierarchicalStreamReader(Exchange exchange,
InputStream stream)
throws XMLStreamException
- Throws:
XMLStreamException
Copyright © 2007-2009 The Apache Software Foundation. All Rights Reserved.