voldemort.serialization
Class IdentitySerializer

java.lang.Object
  extended by voldemort.serialization.IdentitySerializer
All Implemented Interfaces:
Serializer<byte[]>

public class IdentitySerializer
extends java.lang.Object
implements Serializer<byte[]>

A Serializer implementation that does nothing at all, just maps byte arrays to identical byte arrays


Constructor Summary
IdentitySerializer()
           
 
Method Summary
 byte[] toBytes(byte[] bytes)
          Construct an array of bytes from the given object
 byte[] toObject(byte[] bytes)
          Create an object from an array of bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentitySerializer

public IdentitySerializer()
Method Detail

toBytes

public byte[] toBytes(byte[] bytes)
Description copied from interface: Serializer
Construct an array of bytes from the given object

Specified by:
toBytes in interface Serializer<byte[]>
Parameters:
bytes - The object
Returns:
The bytes taken from the object

toObject

public byte[] toObject(byte[] bytes)
Description copied from interface: Serializer
Create an object from an array of bytes

Specified by:
toObject in interface Serializer<byte[]>
Parameters:
bytes - An array of bytes with the objects data
Returns:
A java object serialzed from the bytes


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu