org.apache.hadoop.hive.ql.util.jdbm.helper
Interface Serializer

All Superinterfaces:
Serializable
All Known Implementing Classes:
ByteArraySerializer, DefaultSerializer, IntegerSerializer, LongSerializer

public interface Serializer
extends 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
 Object deserialize(byte[] serialized)
          Deserialize the content of an object from a byte array.
 byte[] serialize(Object obj)
          Serialize the content of an object into a byte array.
 

Method Detail

serialize

byte[] serialize(Object obj)
                 throws 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:
IOException

deserialize

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

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


Copyright © 2009 The Apache Software Foundation