java.lang.Object
com.esotericsoftware.kryo.kryo5.Serializer<org.joda.time.LocalDate>
com.xebialabs.xlrelease.actors.kryoserializers.javakaffee.jodatime.JodaLocalDateSerializer

public class JodaLocalDateSerializer extends com.esotericsoftware.kryo.kryo5.Serializer<org.joda.time.LocalDate>
A Kryo serializer for joda LocalDate. The LocalDate object is read or written as year, month-of-year and day-of-month packed into one integer, and chronology as a separate attribute. No time zone is involved. If the chronology is ISOChronology the attribute is serialized as an empty string, thus ISOChronology is considered to be default. Note that internally the LocalDate object makes use of an iLocalMillis value, but that field is not accessible for reading here because the getLocalMillis() method is protected. There could conceivably be cases where a user has created a derived version of LocalDate, and is using the iLocalMillis value in some way that this serialization/deserialization will break. (Alternative implementation: access the field using Java reflection?)

The following chronologies are supported:

  • ISOChronology
  • CopticChronology
  • EthiopicChronology
  • GregorianChronology
  • JulianChronology
  • IslamicChronology
  • BuddhistChronology
  • GJChronology
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.joda.time.LocalDate
    read(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input, Class<? extends org.joda.time.LocalDate> type)
     
    void
    write(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, org.joda.time.LocalDate localDate)
     

    Methods inherited from class com.esotericsoftware.kryo.kryo5.Serializer

    copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JodaLocalDateSerializer

      public JodaLocalDateSerializer()
  • Method Details

    • read

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

      public void write(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, org.joda.time.LocalDate localDate)
      Specified by:
      write in class com.esotericsoftware.kryo.kryo5.Serializer<org.joda.time.LocalDate>