public class XStreamSerializer extends Object implements Serializer
Serializer which uses XStream as a serialization engine. So,
basically, data is converted to XML during the serialization.
This is the default XRemoting serializer.
| Modifier and Type | Field and Description |
|---|---|
protected com.thoughtworks.xstream.XStream |
xstream |
| Constructor and Description |
|---|
XStreamSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected Reader |
createReader(InputStream is) |
protected Writer |
createWriter(OutputStream os) |
protected com.thoughtworks.xstream.XStream |
createXStream() |
<T> T |
deserialize(InputStream is)
Deserializes an object an
InputStream. |
protected String |
getDefaultCharset() |
void |
serialize(Object object,
OutputStream os)
Serializes an object to an
OutputStream. |
protected com.thoughtworks.xstream.XStream createXStream()
public void serialize(Object object, OutputStream os) throws SerializationException, IOException
SerializerOutputStream.serialize in interface Serializerobject - object to serializeos - output stream to which to serializeSerializationException - if something specific to serializer
happened during the serializationIOException - if input/output error happenedpublic <T> T deserialize(InputStream is) throws SerializationException, IOException
SerializerInputStream.deserialize in interface SerializerT - returned typeis - input stream from which to deserializeSerializationException - if something specific to serializer
happened during the serializationIOException - if input/output error happenedprotected Writer createWriter(OutputStream os) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected Reader createReader(InputStream is) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected String getDefaultCharset()
Copyright © 2015. All Rights Reserved.