com.thoughtworks.xstream.io.binary
Class BinaryStreamDriver

java.lang.Object
  extended by com.thoughtworks.xstream.io.AbstractDriver
      extended by 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 a Reader for input or a Writer for output.

Since:
1.4.2
Author:
Jörg Schaible

Constructor Summary
BinaryStreamDriver()
           
 
Method Summary
 HierarchicalStreamReader createReader(InputStream in)
          Create the HierarchicalStreamReader with the stream parser reading from the input stream.
 HierarchicalStreamReader createReader(Reader in)
          Create the HierarchicalStreamReader with the stream parser reading from the IO reader.
 HierarchicalStreamWriter createWriter(OutputStream out)
          Create the HierarchicalStreamWriter with the formatted writer.
 HierarchicalStreamWriter createWriter(Writer out)
          Create the HierarchicalStreamWriter with the formatted writer.
 
Methods inherited from class com.thoughtworks.xstream.io.AbstractDriver
createReader, createReader, getNameCoder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryStreamDriver

public BinaryStreamDriver()
Method Detail

createReader

public HierarchicalStreamReader createReader(Reader in)
Description copied from interface: HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the IO reader.

Parameters:
in - the Reader with the data to parse
Returns:
the HierarchicalStreamReader
Throws:
UnsupportedOperationException - if called

createReader

public HierarchicalStreamReader createReader(InputStream in)
Description copied from interface: HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the input stream.

Parameters:
in - the InputStream with the data to parse

createWriter

public HierarchicalStreamWriter createWriter(Writer out)
Description copied from interface: HierarchicalStreamDriver
Create the HierarchicalStreamWriter with the formatted writer.

Parameters:
out - the Writer to receive the formatted data
Returns:
the HierarchicalStreamWriter
Throws:
UnsupportedOperationException - if called

createWriter

public HierarchicalStreamWriter createWriter(OutputStream out)
Description copied from interface: HierarchicalStreamDriver
Create the HierarchicalStreamWriter with the formatted writer.

Parameters:
out - the OutputStream to receive the formatted data
Returns:
the HierarchicalStreamWriter


Copyright © 2004-2014 XStream. All Rights Reserved.