org.codehaus.waffle.serialisation
Class XStreamSerialiser

java.lang.Object
  extended by org.codehaus.waffle.serialisation.XStreamSerialiser
All Implemented Interfaces:
Serialiser

public class XStreamSerialiser
extends java.lang.Object
implements Serialiser

XStream-based serialiser. Delegates to XStream the marshalling.

Author:
Mauro Talevi

Constructor Summary
XStreamSerialiser()
          Creates a XStreamSerialiser with default XStream instance with minimal dependencies
XStreamSerialiser(com.thoughtworks.xstream.XStream xstream)
          Creates a XStreamSerialiser with a given XStream instance
 
Method Summary
 void marshall(java.lang.Object object, java.io.Writer writer)
          Marshalls object to a writer
 java.lang.Object unmarshall(java.io.Reader reader)
          Unmarshalls object from reader input
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XStreamSerialiser

public XStreamSerialiser()
Creates a XStreamSerialiser with default XStream instance with minimal dependencies


XStreamSerialiser

public XStreamSerialiser(com.thoughtworks.xstream.XStream xstream)
Creates a XStreamSerialiser with a given XStream instance

Parameters:
xstream - the XStream instance
Method Detail

marshall

public void marshall(java.lang.Object object,
                     java.io.Writer writer)
Description copied from interface: Serialiser
Marshalls object to a writer

Specified by:
marshall in interface Serialiser
Parameters:
object - the Object to marshall
writer - the writer to which the object is marshalled

unmarshall

public java.lang.Object unmarshall(java.io.Reader reader)
Description copied from interface: Serialiser
Unmarshalls object from reader input

Specified by:
unmarshall in interface Serialiser
Parameters:
reader - the input resource
Returns:
An unmarshalled Object


Copyright © 2007 null. All Rights Reserved.