org.switchyard.serial.format
Class XMLBeanSerializer
java.lang.Object
org.switchyard.serial.BaseSerializer
org.switchyard.serial.format.XMLBeanSerializer
- All Implemented Interfaces:
- Serializer
public final class XMLBeanSerializer
- extends BaseSerializer
A JDK serializer that performs FormatType.XML_BEAN
serialization/deserialization.
- Author:
- David Ward <dward@jboss.org> © 2012 Red Hat Inc.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLBeanSerializer
public XMLBeanSerializer()
- Default constructor.
serialize
public <T> int serialize(T obj,
Class<T> type,
OutputStream out)
throws IOException
- Serializes an object of a type to an output stream.
- Type Parameters:
T
- the type of object- Parameters:
obj
- the objecttype
- the typeout
- the output stream
- Returns:
- how many bytes were written
- Throws:
IOException
- something wicked this way comes
deserialize
public <T> T deserialize(InputStream in,
Class<T> type)
throws IOException
- Deserializes an input stream to an object of a type.
- Type Parameters:
T
- the type of object- Parameters:
in
- the input streamtype
- the type
- Returns:
- the object
- Throws:
IOException
- something wicked this way comes
JBoss by Red Hat