com.bigdata.io
Interface IStreamSerializer<T>

All Superinterfaces:
Serializable
All Known Implementing Classes:
SPOBindingSetSerializer

public interface IStreamSerializer<T>
extends Serializable

An abstraction for serializing and de-serializing objects on streams.

Version:
$Id: IStreamSerializer.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
SerializerUtil, IRecordSerializer
TODO:
reconcile ISerializer

Method Summary
 T deserialize(ObjectInput in)
          De-serialize an object.
 void serialize(ObjectOutput out, T obj)
          Serialize an object.
 

Method Detail

serialize

void serialize(ObjectOutput out,
               T obj)
Serialize an object.

Note: All state required to de-serialize the object must be written onto the stream. That may include serializer state as well, such as dictionary that will be used on the other end to decode the object. In such cases the serializer needs to know how to de-serialize both the dictionary and the data. Stateful serializers such as extSer must encapsulate all requisite state on the output stream.

Parameters:
out - The stream onto which the object's state will be written.
obj - The object.

deserialize

T deserialize(ObjectInput in)
De-serialize an object.

Parameters:
in - The stream from which the object's state will be read.
Returns:
The object.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.