jdbm
Interface Serializer<A>

All Known Implementing Classes:
BPage, DefaultSerializer

public interface Serializer<A>

Interface used to provide a serialization mechanism other than a class' normal serialization.

Author:
Alex Boisvert

Method Summary
 A deserialize(SerializerInput in)
          Deserialize the content of an object from a byte array.
 void serialize(SerializerOutput out, A obj)
          Serialize the content of an object into a byte array.
 

Method Detail

serialize

void serialize(SerializerOutput out,
               A obj)
               throws java.io.IOException
Serialize the content of an object into a byte array.

Parameters:
out - DataOutputStream to save object into
obj - Object to serialize
Throws:
java.io.IOException

deserialize

A deserialize(SerializerInput in)
              throws java.io.IOException,
                     java.lang.ClassNotFoundException
Deserialize the content of an object from a byte array.

Parameters:
serialized - DataInputStream to read object from
Returns:
deserialized object
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Cees de Groot (C) 2000. All rights reserved http://jdbm.sourceforge.net