me.prettyprint.cassandra.serializers
Class BytesArraySerializer
java.lang.Object
me.prettyprint.cassandra.serializers.AbstractSerializer<byte[]>
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BytesArraySerializer
public BytesArraySerializer()
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.