me.prettyprint.cassandra.serializers
Class DateSerializer
java.lang.Object
me.prettyprint.cassandra.serializers.AbstractSerializer<Date>
me.prettyprint.cassandra.serializers.DateSerializer
- All Implemented Interfaces:
- Serializer<Date>
public final class DateSerializer
- extends AbstractSerializer<Date>
Converts bytes to Date and vice versa, by first converting the Date to or
from a long which represents the specified number of milliseconds since
the standard base time known as "the Unix epoch", that is
January 1, 1970, 00:00:00 UTC.
- Author:
- Jim Ancona
- See Also:
Date
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateSerializer
public DateSerializer()
get
public static DateSerializer get()
toByteBuffer
public ByteBuffer toByteBuffer(Date obj)
- Description copied from interface:
Serializer
- Extract bytes from the obj of type T
- Specified by:
toByteBuffer
in interface Serializer<Date>
- Specified by:
toByteBuffer
in class AbstractSerializer<Date>
- Returns:
fromByteBuffer
public Date fromByteBuffer(ByteBuffer bytes)
- Description copied from interface:
Serializer
- Extract an object of type T from the bytes.
- Specified by:
fromByteBuffer
in interface Serializer<Date>
- Specified by:
fromByteBuffer
in class AbstractSerializer<Date>
- Returns:
Copyright © 2011. All Rights Reserved.