org.fuin.serialver4j.base
Interface VersioningSerializer

All Known Implementing Classes:
AbstractVersioningHessianSerializer, VersioningBurlapSerializer, VersioningHessian2Serializer, VersioningHessianSerializer, VersioningJavaSerializer, VersioningXStreamSerializer

public interface VersioningSerializer

Serializes or deserializes a given object. Old serialized versions of the objects are converted into their current representation when deserializing the objects.


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.
 

Method Detail

serialize

void serialize(OutputStream out,
               Object obj)
               throws IOException
Writes the object to the stream.

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

deserialize

Object deserialize(InputStream in)
                   throws IOException,
                          DeserializationException
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.


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