de.netseeker.ejoe.adapter
Class JavolutionAdapter

java.lang.Object
  extended by de.netseeker.ejoe.adapter.BaseAdapter
      extended by de.netseeker.ejoe.adapter.JavolutionAdapter
All Implemented Interfaces:
SerializeAdapter, java.io.Serializable

public class JavolutionAdapter
extends BaseAdapter

An adapter for (de)serializing objects via the javolution library

Since:
0.3.9.1
Author:
netseeker
See Also:
http://javolution.org/, Serialized Form

Constructor Summary
JavolutionAdapter()
          Creates a new instance of JavolutionAdapter preconfigured with additional custom XmlFormats for java.math.BigDecimal java.math.BigInteger
JavolutionAdapter(java.lang.Class[] classes, javolution.xml.XmlFormat[] formats)
          Creates a new instance of JavolutionAdapter preconfigured with the provided XmlFormats.
 
Method Summary
 java.lang.String getContentType()
           
 java.lang.Object read(java.io.InputStream in)
          Deserializes an object out of an given InputStream
 void write(java.lang.Object obj, java.io.OutputStream out)
          Serializes an object into an output stream
 
Methods inherited from class de.netseeker.ejoe.adapter.BaseAdapter
handleClassLoaderChange, isSelfBuffered, requiresCustomEOFHandling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavolutionAdapter

public JavolutionAdapter()
Creates a new instance of JavolutionAdapter preconfigured with additional custom XmlFormats for


JavolutionAdapter

public JavolutionAdapter(java.lang.Class[] classes,
                         javolution.xml.XmlFormat[] formats)
Creates a new instance of JavolutionAdapter preconfigured with the provided XmlFormats.

Parameters:
classes - array of classes for which custom XmlFormats are provided in the formats parameter
formats - array of XmlFormats
Method Detail

read

public java.lang.Object read(java.io.InputStream in)
                      throws java.lang.Exception
Description copied from interface: SerializeAdapter
Deserializes an object out of an given InputStream

Parameters:
in - the input stream to use for deserialization
Returns:
a deserialized object instance
Throws:
java.lang.Exception

write

public void write(java.lang.Object obj,
                  java.io.OutputStream out)
           throws java.lang.Exception
Description copied from interface: SerializeAdapter
Serializes an object into an output stream

Parameters:
obj - object that should get serialized
out - the outputstream into which the object should serialized
Throws:
java.lang.Exception

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface SerializeAdapter
Overrides:
getContentType in class BaseAdapter
Returns:
A recognized mime type
See Also:
mime type list of IANA


Copyright © 2005-2007 netseeker. All Rights Reserved.