Class GregorianCalendarSerializer

java.lang.Object
com.esotericsoftware.kryo.kryo5.Serializer<GregorianCalendar>
com.xebialabs.xlrelease.actors.kryoserializers.javakaffee.GregorianCalendarSerializer

public class GregorianCalendarSerializer extends com.esotericsoftware.kryo.kryo5.Serializer<GregorianCalendar>
A more efficient kryo Serializer for GregorianCalendar instances (which are created via Calendar.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.

  • Constructor Details

    • GregorianCalendarSerializer

      public GregorianCalendarSerializer()
  • Method Details

    • read

      public GregorianCalendar read(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input, Class<? extends GregorianCalendar> type)
      Specified by:
      read in class com.esotericsoftware.kryo.kryo5.Serializer<GregorianCalendar>
    • write

      public void write(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, GregorianCalendar calendar)
      Specified by:
      write in class com.esotericsoftware.kryo.kryo5.Serializer<GregorianCalendar>
    • copy

      public GregorianCalendar copy(com.esotericsoftware.kryo.kryo5.Kryo kryo, GregorianCalendar original)
      Overrides:
      copy in class com.esotericsoftware.kryo.kryo5.Serializer<GregorianCalendar>