public class DateSerializer extends com.esotericsoftware.kryo.Serializer<Date>
Serializer for Date and subclasses. Must be registered like this:
Kryo kryo = new Kryo() {
public Serializer> getDefaultSerializer(final Class clazz) {
if ( Date.class.isAssignableFrom( type ) ) {
return new DateSerializer( type );
}
return super.getDefaultSerializer( clazz );
}
};
| Constructor and Description |
|---|
DateSerializer(Class<? extends Date> clazz) |
| Modifier and Type | Method and Description |
|---|---|
Date |
copy(com.esotericsoftware.kryo.Kryo kryo,
Date original) |
Date |
read(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
Class<Date> type) |
void |
write(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output,
Date obj) |
public Date read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<Date> type)
read in class com.esotericsoftware.kryo.Serializer<Date>public void write(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output,
Date obj)
write in class com.esotericsoftware.kryo.Serializer<Date>Copyright © 2010-2015. All Rights Reserved.