me.prettyprint.cassandra.serializers
Class AsciiSerializer

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

public final class AsciiSerializer
extends AbstractSerializer<String>

Almost identical to StringSerializer except we use the US-ASCII character set code

Author:
zznate

Constructor Summary
AsciiSerializer()
           
 
Method Summary
 String fromByteBuffer(ByteBuffer byteBuffer)
          Extract an object of type T from the bytes.
static AsciiSerializer get()
           
 ComparatorType getComparatorType()
           
 ByteBuffer toByteBuffer(String 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

AsciiSerializer

public AsciiSerializer()
Method Detail

get

public static AsciiSerializer get()

fromByteBuffer

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

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

toByteBuffer

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

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

getComparatorType

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


Copyright © 2011. All Rights Reserved.