me.prettyprint.cassandra.serializers
Class BytesArraySerializer

java.lang.Object
  extended by me.prettyprint.cassandra.serializers.AbstractSerializer<byte[]>
      extended by me.prettyprint.cassandra.serializers.BytesArraySerializer
All Implemented Interfaces:
Serializer<byte[]>

public final class BytesArraySerializer
extends AbstractSerializer<byte[]>
implements Serializer<byte[]>

A BytesArraySerializer translates the byte[] to and from ByteBuffer.

Author:
Patricio Echague

Constructor Summary
BytesArraySerializer()
           
 
Method Summary
 byte[] fromByteBuffer(ByteBuffer byteBuffer)
          Extract an object of type T from the bytes.
static BytesArraySerializer get()
           
 ByteBuffer toByteBuffer(byte[] obj)
          Extract bytes from the obj of type T
 
Methods inherited from class me.prettyprint.cassandra.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, getComparatorType, toBytes, toBytesList, toBytesMap, toBytesSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface me.prettyprint.hector.api.Serializer
fromBytes, fromBytesList, fromBytesMap, fromBytesSet, getComparatorType, toBytes, toBytesList, toBytesMap, toBytesSet
 

Constructor Detail

BytesArraySerializer

public BytesArraySerializer()
Method Detail

get

public static BytesArraySerializer get()

toByteBuffer

public ByteBuffer toByteBuffer(byte[] obj)
Description copied from interface: Serializer
Extract bytes from the obj of type T

Specified by:
toByteBuffer in interface Serializer<byte[]>
Specified by:
toByteBuffer in class AbstractSerializer<byte[]>
Returns:

fromByteBuffer

public byte[] fromByteBuffer(ByteBuffer byteBuffer)
Description copied from interface: Serializer
Extract an object of type T from the bytes.

Specified by:
fromByteBuffer in interface Serializer<byte[]>
Specified by:
fromByteBuffer in class AbstractSerializer<byte[]>
Returns:


Copyright © 2011. All Rights Reserved.