Package de.javakaffee.kryoserializers
Class GregorianCalendarSerializer
- java.lang.Object
-
- com.esotericsoftware.kryo.Serializer<GregorianCalendar>
-
- de.javakaffee.kryoserializers.GregorianCalendarSerializer
-
public class GregorianCalendarSerializer extends com.esotericsoftware.kryo.Serializer<GregorianCalendar>
A more efficient kryoSerializerforGregorianCalendarinstances (which are created viaCalendar.getInstance()if the locale is not thai or japanese, so JapaneseImperialCalendar and BuddhistCalendar are not supported by this serializer).With the default reflection based serialization, a calendar instance (created via
Calendar.getInstance(Locale.ENGLISH)) would take 1323 byte, this one only takes 24 byte.- Author:
- Martin Grotzke
-
-
Constructor Summary
Constructors Constructor Description GregorianCalendarSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GregorianCalendarcopy(com.esotericsoftware.kryo.Kryo kryo, GregorianCalendar original)GregorianCalendarread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends GregorianCalendar> type)voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, GregorianCalendar calendar)
-
-
-
Method Detail
-
read
public GregorianCalendar read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends GregorianCalendar> type)
- Specified by:
readin classcom.esotericsoftware.kryo.Serializer<GregorianCalendar>
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, GregorianCalendar calendar)- Specified by:
writein classcom.esotericsoftware.kryo.Serializer<GregorianCalendar>
-
copy
public GregorianCalendar copy(com.esotericsoftware.kryo.Kryo kryo, GregorianCalendar original)
- Overrides:
copyin classcom.esotericsoftware.kryo.Serializer<GregorianCalendar>
-
-