org.apache.camel.converter.jaxb
Class JaxbDataFormat
java.lang.Object
org.apache.camel.converter.jaxb.JaxbDataFormat
- All Implemented Interfaces:
- DataFormat
public class JaxbDataFormat
- extends Object
- implements DataFormat
A data format (DataFormat)
using JAXB2 to marshal to and from XML
- Version:
- $Revision: 834590 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JaxbDataFormat
public JaxbDataFormat()
JaxbDataFormat
public JaxbDataFormat(JAXBContext context)
JaxbDataFormat
public JaxbDataFormat(String contextPath)
marshal
public void marshal(Exchange exchange,
Object graph,
OutputStream stream)
throws IOException
- Specified by:
marshal in interface DataFormat
- Throws:
IOException
unmarshal
public Object unmarshal(Exchange exchange,
InputStream stream)
throws IOException,
ClassNotFoundException
- Specified by:
unmarshal in interface DataFormat
- Throws:
IOException
ClassNotFoundException
isIgnoreJAXBElement
public boolean isIgnoreJAXBElement()
setIgnoreJAXBElement
public void setIgnoreJAXBElement(boolean flag)
getContext
public JAXBContext getContext()
throws JAXBException
- Throws:
JAXBException
setContext
public void setContext(JAXBContext context)
getContextPath
public String getContextPath()
setContextPath
public void setContextPath(String contextPath)
isPrettyPrint
public boolean isPrettyPrint()
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
getEncoding
public String getEncoding()
setEncoding
public void setEncoding(String encoding)
createContext
protected JAXBContext createContext()
throws JAXBException
- Throws:
JAXBException
Copyright © 2007-2009 The Apache Software Foundation. All Rights Reserved.