public class JaxbSerializer extends AbstractSerializer<Object>
| Constructor and Description |
|---|
JaxbSerializer(Class<?>... serializableClasses)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected XMLStreamReader |
createStreamReader(InputStream input)
Get a new XML stream reader.
|
protected XMLStreamWriter |
createStreamWriter(OutputStream output)
Get a new XML stream writer.
|
Object |
fromByteBuffer(ByteBuffer bytes)
Extract an object of type T from the bytes.
|
ByteBuffer |
toByteBuffer(Object obj)
Extract bytes from the obj of type T
|
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, getComparatorType, toBytes, toBytesList, toBytesMap, toBytesSetpublic JaxbSerializer(Class<?>... serializableClasses)
serializableClasses - List of classes which can be serialized by this instance. Note
that concrete classes directly referenced by any class in the list
will also be serializable through this instance.public ByteBuffer toByteBuffer(Object obj)
toByteBuffer in interface Serializer<Object>toByteBuffer in class AbstractSerializer<Object>public Object fromByteBuffer(ByteBuffer bytes)
fromByteBuffer in interface Serializer<Object>fromByteBuffer in class AbstractSerializer<Object>protected XMLStreamWriter createStreamWriter(OutputStream output) throws XMLStreamException
output - An underlying OutputStream to write to.XMLStreamWriter which writes to the specified
OutputStream. The output written by this XMLStreamWriter is
understandable by XMLStreamReaders produced by
createStreamReader(InputStream).XMLStreamExceptionprotected XMLStreamReader createStreamReader(InputStream input) throws XMLStreamException
input - the underlying InputStream to read from.XmlStreamReader which reads from the specified
InputStream. The reader can read anything written by
createStreamWriter(OutputStream).XMLStreamExceptionCopyright © 2014. All Rights Reserved.