org.fuin.serialver4j.hessian
Class VersioningBurlapSerializer

java.lang.Object
  extended by org.fuin.serialver4j.hessian.AbstractVersioningHessianSerializer
      extended by org.fuin.serialver4j.hessian.VersioningBurlapSerializer
All Implemented Interfaces:
VersioningSerializer

public final class VersioningBurlapSerializer
extends AbstractVersioningHessianSerializer

Serializes and deserializes a given object using Burlap. The serial version UID of the object and it's type will be added to the stream before serializing the object itself.


Constructor Summary
VersioningBurlapSerializer(ClassesHistory history)
          Constructor with history.
VersioningBurlapSerializer(ClassesHistory history, int pushbackBufSize, com.caucho.hessian.io.SerializerFactory serializerFactory)
          Constructor with history.
VersioningBurlapSerializer(ClassesHistory history, com.caucho.hessian.io.SerializerFactory serializerFactory)
          Constructor with history and serializer factory.
 
Method Summary
 Object deserialize(InputStream in)
          Reads an object from the stream and converts old versions of the object into the current representation.
 void serialize(OutputStream out, Object obj)
          Writes the object to the stream.
 
Methods inherited from class org.fuin.serialver4j.hessian.AbstractVersioningHessianSerializer
getPushbackBufSize, getVersionTag, readObject, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersioningBurlapSerializer

public VersioningBurlapSerializer(ClassesHistory history)
Constructor with history. The pushback buffer size will default to 512 and the serializer factory is set to SerializerFactory.

Parameters:
history - History to use.

VersioningBurlapSerializer

public VersioningBurlapSerializer(ClassesHistory history,
                                  com.caucho.hessian.io.SerializerFactory serializerFactory)
Constructor with history and serializer factory. The pushback buffer size will default to 512.

Parameters:
history - History to use.
serializerFactory - Serializer factory to use.

VersioningBurlapSerializer

public VersioningBurlapSerializer(ClassesHistory history,
                                  int pushbackBufSize,
                                  com.caucho.hessian.io.SerializerFactory serializerFactory)
Constructor with history.

Parameters:
history - History to use.
pushbackBufSize - Size of the push back buffer.
serializerFactory - Serializer factory to use.
Method Detail

deserialize

public final Object deserialize(InputStream in)
                         throws IOException,
                                DeserializationException
Description copied from interface: VersioningSerializer
Reads an object from the stream and converts old versions of the object into the current representation.

Parameters:
in - Stream to read.
Returns:
Object.
Throws:
IOException - Error reading the stream or the stream contains a wrong format.
DeserializationException - Error deserializing the input to an object.

serialize

public final void serialize(OutputStream out,
                            Object obj)
                     throws IOException
Description copied from interface: VersioningSerializer
Writes the object to the stream.

Parameters:
out - Stream to write to.
obj - Object to serialize.
Throws:
IOException - Error writing to the stream.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.