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 |
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) |
Copyright © 2010-2013. All Rights Reserved.