Class BinaryStreamDriver
- java.lang.Object
-
- com.thoughtworks.xstream.io.AbstractDriver
-
- com.thoughtworks.xstream.io.binary.BinaryStreamDriver
-
- All Implemented Interfaces:
HierarchicalStreamDriver
public class BinaryStreamDriver extends AbstractDriver
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 aReader
for input or aWriter
for output.- Since:
- 1.4.2
-
-
Constructor Summary
Constructors Constructor Description BinaryStreamDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HierarchicalStreamReader
createReader(java.io.InputStream in)
Create the HierarchicalStreamReader with the stream parser reading from the input stream.HierarchicalStreamReader
createReader(java.io.Reader in)
Create the HierarchicalStreamReader with the stream parser reading from the IO reader.HierarchicalStreamWriter
createWriter(java.io.OutputStream out)
Create the HierarchicalStreamWriter with the formatted writer.HierarchicalStreamWriter
createWriter(java.io.Writer out)
Create the HierarchicalStreamWriter with the formatted writer.-
Methods inherited from class com.thoughtworks.xstream.io.AbstractDriver
createReader, createReader, getNameCoder
-
-
-
-
Method Detail
-
createReader
public HierarchicalStreamReader createReader(java.io.Reader in)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the IO reader.- Parameters:
in
- theReader
with the data to parse- Returns:
- the HierarchicalStreamReader
- Throws:
java.lang.UnsupportedOperationException
- if called
-
createReader
public HierarchicalStreamReader createReader(java.io.InputStream in)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the input stream.- Parameters:
in
- theInputStream
with the data to parse
-
createWriter
public HierarchicalStreamWriter createWriter(java.io.Writer out)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamWriter with the formatted writer.- Parameters:
out
- theWriter
to receive the formatted data- Returns:
- the HierarchicalStreamWriter
- Throws:
java.lang.UnsupportedOperationException
- if called
-
createWriter
public HierarchicalStreamWriter createWriter(java.io.OutputStream out)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamWriter with the formatted writer.- Parameters:
out
- theOutputStream
to receive the formatted data- Returns:
- the HierarchicalStreamWriter
-
-