com.thoughtworks.xstream.tools.benchmark.products
Class XStreamDriver

java.lang.Object
  extended by com.thoughtworks.xstream.tools.benchmark.products.XStreamDriver
All Implemented Interfaces:
Product
Direct Known Subclasses:
XStreamBEAStax, XStreamDom, XStreamDom4J, XStreamJDom, XStreamKXml2, XStreamKXml2DOM, XStreamSjsxp, XStreamStax, XStreamWoodstox, XStreamXom, XStreamXpp, XStreamXpp3, XStreamXpp3DOM

public class XStreamDriver
extends Object
implements Product

Generic XStream product based on an arbitrary driver.

Since:
1.4
Author:
Joe Walnes, Jörg Schaible
See Also:
XStream, Product, HierarchicalStreamDriver

Constructor Summary
XStreamDriver(HierarchicalStreamDriver driver, String desc)
          Create a XStream product based on a driver.
 
Method Summary
 Object deserialize(InputStream input)
          Deserialize an object from a stream.
 void serialize(Object object, OutputStream output)
          Serialize an object to a stream.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XStreamDriver

public XStreamDriver(HierarchicalStreamDriver driver,
                     String desc)
Create a XStream product based on a driver.

Parameters:
driver - the driver to use for serialization/deserialization
desc - the driver description
Since:
1.4
Method Detail

serialize

public void serialize(Object object,
                      OutputStream output)
               throws Exception
Description copied from interface: Product
Serialize an object to a stream.

Specified by:
serialize in interface Product
Throws:
Exception

deserialize

public Object deserialize(InputStream input)
                   throws Exception
Description copied from interface: Product
Deserialize an object from a stream.

Specified by:
deserialize in interface Product
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2014 XStream. All Rights Reserved.