me.prettyprint.cassandra.serializers
Class IntegerSerializer
java.lang.Object
me.prettyprint.cassandra.serializers.AbstractSerializer<Integer>
me.prettyprint.cassandra.serializers.IntegerSerializer
- All Implemented Interfaces:
- Serializer<Integer>
public final class IntegerSerializer
- extends AbstractSerializer<Integer>
Converts bytes to Integer and vice versa
- Author:
- Bozhidar Bozhanov
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegerSerializer
public IntegerSerializer()
get
public static IntegerSerializer get()
toByteBuffer
public ByteBuffer toByteBuffer(Integer obj)
- Description copied from interface:
Serializer
- Extract bytes from the obj of type T
- Specified by:
toByteBuffer
in interface Serializer<Integer>
- Specified by:
toByteBuffer
in class AbstractSerializer<Integer>
- Returns:
fromByteBuffer
public Integer fromByteBuffer(ByteBuffer byteBuffer)
- Description copied from interface:
Serializer
- Extract an object of type T from the bytes.
- Specified by:
fromByteBuffer
in interface Serializer<Integer>
- Specified by:
fromByteBuffer
in class AbstractSerializer<Integer>
- Returns:
fromBytes
public Integer fromBytes(byte[] bytes)
- Specified by:
fromBytes
in interface Serializer<Integer>
- Overrides:
fromBytes
in class AbstractSerializer<Integer>
Copyright © 2011. All Rights Reserved.