org.jcurl.core.xsio
Class XStreamSerializer

Package class diagram package XStreamSerializer
java.lang.Object
  extended by org.jcurl.core.xsio.XStreamSerializer
All Implemented Interfaces:
JCurlSerializer.Engine

public class XStreamSerializer
extends Object
implements JCurlSerializer.Engine

Uses the great XStream for serialization.

To be extensible the configuration (XStream.registerConverter(Converter) and XStream.alias(String, Class)) should be applied by implementations of an interface and the service provider plugin mechanism.

Version:
$Id:XStreamSerializer.java 752 2007-12-09 22:49:16Z mrohrmoser $
Author:
M. Rohrmoser

Nested Class Summary
(package private) static class XStreamSerializer.MeasureConverter
           
(package private) static class XStreamSerializer.RockConverter
           
 
Constructor Summary
XStreamSerializer()
           
 
Method Summary
 IONode read(InputStream src)
           
 IONode read(InputStream src, IONode dst)
           
 IONode read(InputStream src, String name, IONode dst)
           
 IONode read(Reader src, IONode dst)
           
 IONode read(String s)
           
protected  com.thoughtworks.xstream.XStream registerAliases(com.thoughtworks.xstream.XStream xs)
          Map all basic concepts to be a little bit robust against refactorings.
protected  com.thoughtworks.xstream.XStream registerConverter(com.thoughtworks.xstream.XStream xs)
           
 String write(IONode src)
           
 void write(IONode src, OutputStream dst)
           
 void write(IONode src, Writer dst)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XStreamSerializer

public XStreamSerializer()
Method Detail

read

public IONode read(InputStream src)
            throws IOException
Specified by:
read in interface JCurlSerializer.Engine
Throws:
IOException

read

public IONode read(InputStream src,
                   IONode dst)

read

public IONode read(InputStream src,
                   String name,
                   IONode dst)
            throws IOException
Throws:
IOException

read

public IONode read(Reader src,
                   IONode dst)

read

public IONode read(String s)

registerAliases

protected com.thoughtworks.xstream.XStream registerAliases(com.thoughtworks.xstream.XStream xs)
Map all basic concepts to be a little bit robust against refactorings. Make the aliases upper- or camelcase to distinguish them from properties.


registerConverter

protected com.thoughtworks.xstream.XStream registerConverter(com.thoughtworks.xstream.XStream xs)

write

public String write(IONode src)

write

public void write(IONode src,
                  OutputStream dst)
Specified by:
write in interface JCurlSerializer.Engine

write

public void write(IONode src,
                  Writer dst)


Copyright © 2005-2009 jcurl.org. All Rights Reserved.