jdbm.helper
Interface Serializer

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
BPage, ByteArraySerializer, DefaultSerializer, IntegerSerializer, LongSerializer

public interface Serializer
extends java.io.Serializable

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

Version:
$Id: Serializer.java,v 1.1 2003/03/21 02:48:42 boisvert Exp $
Author:
Alex Boisvert

Method Summary
 java.lang.Object deserialize(byte[] serialized)
          Deserialize the content of an object from a byte array.
 byte[] serialize(java.lang.Object obj)
          Serialize the content of an object into a byte array.
 

Method Detail

serialize

byte[] serialize(java.lang.Object obj)
                 throws java.io.IOException
Serialize the content of an object into a byte array.

Parameters:
obj - Object to serialize
Returns:
a byte array representing the object's state
Throws:
java.io.IOException

deserialize

java.lang.Object deserialize(byte[] serialized)
                             throws java.io.IOException
Deserialize the content of an object from a byte array.

Parameters:
serialized - Byte array representation of the object
Returns:
deserialized object
Throws:
java.io.IOException


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