Class JodaDateTimeSerializer


  • public class JodaDateTimeSerializer
    extends com.esotericsoftware.kryo.Serializer<org.joda.time.DateTime>
    A format for joda DateTime, that stores the millis, chronology and time zone as separate attributes. If the chronology is ISOChronology, the attribute is omitted, thus ISOChronology is seen as default. If the time zone is the default time zone (DateTimeZone.getDefault()), the time zone attribute is omitted. This requires different machines to have the same time zone settings.

    The following chronologies are supported:

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

    Author:
    Martin Grotzke
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.joda.time.DateTime read​(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends org.joda.time.DateTime> type)  
      void write​(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, org.joda.time.DateTime obj)  
      • Methods inherited from class com.esotericsoftware.kryo.Serializer

        copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
    • Constructor Detail

      • JodaDateTimeSerializer

        public JodaDateTimeSerializer()
    • Method Detail

      • read

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

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