me.prettyprint.cassandra.serializers
Class LongSerializer

java.lang.Object
  extended by me.prettyprint.cassandra.serializers.AbstractSerializer<Long>
      extended by me.prettyprint.cassandra.serializers.LongSerializer
All Implemented Interfaces:
Serializer<Long>

public final class LongSerializer
extends AbstractSerializer<Long>

Converts bytes to Long and vise a versa

Author:
Ran Tavory

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

Constructor Detail

LongSerializer

public LongSerializer()
Method Detail

get

public static LongSerializer get()

toByteBuffer

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

Specified by:
toByteBuffer in interface Serializer<Long>
Specified by:
toByteBuffer in class AbstractSerializer<Long>
Returns:

fromByteBuffer

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

Specified by:
fromByteBuffer in interface Serializer<Long>
Specified by:
fromByteBuffer in class AbstractSerializer<Long>
Returns:

getComparatorType

public ComparatorType getComparatorType()
Specified by:
getComparatorType in interface Serializer<Long>
Overrides:
getComparatorType in class AbstractSerializer<Long>


Copyright © 2011. All Rights Reserved.