me.prettyprint.cassandra.serializers
Class ObjectSerializer
java.lang.Object
me.prettyprint.cassandra.serializers.AbstractSerializer<Object>
me.prettyprint.cassandra.serializers.ObjectSerializer
- All Implemented Interfaces:
- Serializer<Object>
public class ObjectSerializer
- extends AbstractSerializer<Object>
- implements Serializer<Object>
The ObjectSerializer is used to turn objects into their binary
representations.
- Author:
- Bozhidar Bozhanov
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectSerializer
public ObjectSerializer()
ObjectSerializer
public ObjectSerializer(ClassLoader cl)
- Parameters:
cl
- - the classloader to use when deserializing objects.
toByteBuffer
public ByteBuffer toByteBuffer(Object obj)
- Description copied from interface:
Serializer
- Extract bytes from the obj of type T
- Specified by:
toByteBuffer
in interface Serializer<Object>
- Specified by:
toByteBuffer
in class AbstractSerializer<Object>
- Returns:
fromByteBuffer
public Object fromByteBuffer(ByteBuffer bytes)
- Description copied from interface:
Serializer
- Extract an object of type T from the bytes.
- Specified by:
fromByteBuffer
in interface Serializer<Object>
- Specified by:
fromByteBuffer
in class AbstractSerializer<Object>
- Returns:
get
public static ObjectSerializer get()
Copyright © 2011. All Rights Reserved.