Top Description Constructors Methods
com.thoughtworks.xstream.io.binary

public Class BinaryStreamDriver

extends AbstractDriver
Class Inheritance
Imports
java.io.InputStream, .OutputStream, .Reader, .Writer, com.thoughtworks.xstream.io.AbstractDriver, .HierarchicalStreamReader, .HierarchicalStreamWriter

HierarchicalStreamDriver for binary input and output. The driver uses an optimized binary format to store an object graph. The format is not as compact as Java serialization, but a lot more than typical text-based formats like XML. However, due to its nature it cannot use a Reader for input or a Writer for output.
Author
Jörg Schaible
Since
1.4.2

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HierarchicalStreamReader
createReader(Reader
the Reader with the data to parse
in
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from the IO reader.
public HierarchicalStreamReader
createReader(InputStream
the InputStream with the data to parse
in
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from the input stream.
public HierarchicalStreamWriter
createWriter(Writer
the Writer to receive the formatted data
out
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Create the HierarchicalStreamWriter with the formatted writer.
public HierarchicalStreamWriter
createWriter(OutputStream
the OutputStream to receive the formatted data
out
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Create the HierarchicalStreamWriter with the formatted writer.
Inherited from com.thoughtworks.xstream.io.AbstractDriver:
createReadercreateReadergetNameCoder

Constructor Detail

BinaryStreamDriverback to summary
public BinaryStreamDriver()

Method Detail

createReaderback to summary
public HierarchicalStreamReader createReader(Reader in)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from the IO reader.

Parameters
in:Reader

the Reader with the data to parse

Returns:HierarchicalStreamReader

the HierarchicalStreamReader

Exceptions
UnsupportedOperationException:
if called
createReaderback to summary
public HierarchicalStreamReader createReader(InputStream in)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from the input stream.

Parameters
in:InputStream

the InputStream with the data to parse

createWriterback to summary
public HierarchicalStreamWriter createWriter(Writer out)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Create the HierarchicalStreamWriter with the formatted writer.

Parameters
out:Writer

the Writer to receive the formatted data

Returns:HierarchicalStreamWriter

the HierarchicalStreamWriter

Exceptions
UnsupportedOperationException:
if called
createWriterback to summary
public HierarchicalStreamWriter createWriter(OutputStream out)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Create the HierarchicalStreamWriter with the formatted writer.

Parameters
out:OutputStream

the OutputStream to receive the formatted data

Returns:HierarchicalStreamWriter

the HierarchicalStreamWriter