public class XStreamSerializationHandler extends AbstractTextSerializationHandler<java.io.Serializable>
Modifier and Type | Field and Description |
---|---|
protected com.thoughtworks.xstream.XStream |
xstream
The configured XStream object to use.
|
Constructor and Description |
---|
XStreamSerializationHandler()
Creates a new
XStreamSerializationHandler using a default
XStream object underneath. |
XStreamSerializationHandler(com.thoughtworks.xstream.XStream xstream)
Creates a new
XStreamSerializationHandler with the given
XStream configuration. |
Modifier and Type | Method and Description |
---|---|
static XStreamSerializationHandler |
getDefault()
Gets the default instance
XStreamSerializationHandler . |
java.lang.Object |
readObject(java.io.Reader reader)
Reads an object from the given reader.
|
void |
writeObject(java.io.Writer writer,
java.io.Serializable object)
Writes an object to the given writer.
|
convertFromString, convertToString, readObject, writeObject
convertFromBytes, convertToBytes, readFromFile, writeToFile
readFromFile, writeToFile
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertFromBytes, convertToBytes
readFromFile, readFromFile, writeToFile, writeToFile
protected transient com.thoughtworks.xstream.XStream xstream
public XStreamSerializationHandler()
XStreamSerializationHandler
using a default
XStream
object underneath.public XStreamSerializationHandler(com.thoughtworks.xstream.XStream xstream)
XStreamSerializationHandler
with the given
XStream
configuration.xstream
- The XStream configuration to use. Cannot be null.public static XStreamSerializationHandler getDefault()
XStreamSerializationHandler
.public void writeObject(java.io.Writer writer, java.io.Serializable object) throws java.io.IOException
TextSerializationHandler
writer
- Writer to write the object to.object
- The object to write.java.io.IOException
- If there is an i/o error.public java.lang.Object readObject(java.io.Reader reader) throws java.io.IOException
TextSerializationHandler
reader
- The reader to read an object from.java.io.IOException
- If there is an i/o error.