me.prettyprint.cassandra.serializers
Class StringSerializer
java.lang.Object
me.prettyprint.cassandra.serializers.AbstractSerializer<String>
me.prettyprint.cassandra.serializers.StringSerializer
- All Implemented Interfaces:
- Serializer<String>
public final class StringSerializer
- extends AbstractSerializer<String>
A StringSerializer translates the byte[] to and from string using utf-8
encoding.
- Author:
- Ran Tavory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringSerializer
public StringSerializer()
get
public static StringSerializer get()
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:
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:
getComparatorType
public ComparatorType getComparatorType()
- Specified by:
getComparatorType
in interface Serializer<String>
- Overrides:
getComparatorType
in class AbstractSerializer<String>
Copyright © 2011. All Rights Reserved.