Class BinaryStreamDriver
java.lang.Object
com.thoughtworks.xstream.io.AbstractDriver
com.thoughtworks.xstream.io.binary.BinaryStreamDriver
- All Implemented Interfaces:
HierarchicalStreamDriver
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.- Since:
- 1.4.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate the HierarchicalStreamReader with the stream parser reading from the input stream.createReader(Reader in) Create the HierarchicalStreamReader with the stream parser reading from the IO reader.createWriter(OutputStream out) Create the HierarchicalStreamWriter with the formatted writer.createWriter(Writer out) Create the HierarchicalStreamWriter with the formatted writer.Methods inherited from class AbstractDriver
createReader, createReader, getNameCoder
-
Constructor Details
-
BinaryStreamDriver
public BinaryStreamDriver()
-
-
Method Details
-
createReader
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamReader with the stream parser reading from the IO reader.- Parameters:
in- theReaderwith the data to parse- Returns:
- the HierarchicalStreamReader
- Throws:
UnsupportedOperationException- if called
-
createReader
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamReader with the stream parser reading from the input stream.- Parameters:
in- theInputStreamwith the data to parse
-
createWriter
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamWriter with the formatted writer.- Parameters:
out- theWriterto receive the formatted data- Returns:
- the HierarchicalStreamWriter
- Throws:
UnsupportedOperationException- if called
-
createWriter
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamWriter with the formatted writer.- Parameters:
out- theOutputStreamto receive the formatted data- Returns:
- the HierarchicalStreamWriter
-