com.netflix.astyanax.serializers
Class ShortSerializer

java.lang.Object
  extended by com.netflix.astyanax.serializers.AbstractSerializer<java.lang.Short>
      extended by com.netflix.astyanax.serializers.ShortSerializer
All Implemented Interfaces:
Serializer<java.lang.Short>

public final class ShortSerializer
extends AbstractSerializer<java.lang.Short>

Serializer for Shorts (no pun intended).


Constructor Summary
ShortSerializer()
           
 
Method Summary
 java.lang.Short fromByteBuffer(java.nio.ByteBuffer byteBuffer)
          Extract an object of type T from the bytes.
 java.nio.ByteBuffer fromString(java.lang.String str)
          Create a ByteBuffer by first parsing the type out of a string
static ShortSerializer get()
           
 java.nio.ByteBuffer getNext(java.nio.ByteBuffer byteBuffer)
          Return the byte buffer for the next value in sorted order for the matching comparator type.
 java.lang.String getString(java.nio.ByteBuffer byteBuffer)
           
 java.nio.ByteBuffer toByteBuffer(java.lang.Short obj)
          Extract bytes from the obj of type T
 
Methods inherited from class com.netflix.astyanax.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, getComparatorType, toBytes, toBytesList, toBytesList, toBytesList, toBytesMap, toBytesSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortSerializer

public ShortSerializer()
Method Detail

get

public static ShortSerializer get()

toByteBuffer

public java.nio.ByteBuffer toByteBuffer(java.lang.Short obj)
Description copied from interface: Serializer
Extract bytes from the obj of type T

Specified by:
toByteBuffer in interface Serializer<java.lang.Short>
Specified by:
toByteBuffer in class AbstractSerializer<java.lang.Short>
Returns:

fromByteBuffer

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

Specified by:
fromByteBuffer in interface Serializer<java.lang.Short>
Specified by:
fromByteBuffer in class AbstractSerializer<java.lang.Short>
Returns:

fromString

public java.nio.ByteBuffer fromString(java.lang.String str)
Description copied from interface: Serializer
Create a ByteBuffer by first parsing the type out of a string

Specified by:
fromString in interface Serializer<java.lang.Short>
Overrides:
fromString in class AbstractSerializer<java.lang.Short>
Returns:

getString

public java.lang.String getString(java.nio.ByteBuffer byteBuffer)
Specified by:
getString in interface Serializer<java.lang.Short>
Overrides:
getString in class AbstractSerializer<java.lang.Short>

getNext

public java.nio.ByteBuffer getNext(java.nio.ByteBuffer byteBuffer)
Description copied from interface: Serializer
Return the byte buffer for the next value in sorted order for the matching comparator type. This is used for paginating columns.

Specified by:
getNext in interface Serializer<java.lang.Short>
Overrides:
getNext in class AbstractSerializer<java.lang.Short>
Returns: