voldemort.serialization
Class ByteArraySerializer

java.lang.Object
  extended by voldemort.serialization.ByteArraySerializer
All Implemented Interfaces:
Serializer<ByteArray>

public final class ByteArraySerializer
extends java.lang.Object
implements Serializer<ByteArray>


Constructor Summary
ByteArraySerializer()
           
 
Method Summary
 byte[] toBytes(ByteArray object)
          Construct an array of bytes from the given object
 ByteArray 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

ByteArraySerializer

public ByteArraySerializer()
Method Detail

toBytes

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

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

toObject

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

Specified by:
toObject in interface Serializer<ByteArray>
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