public class JodaLocalDateSerializer
extends com.esotericsoftware.kryo.Serializer<org.joda.time.LocalDate>
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:
ISOChronologyCopticChronologyEthiopicChronologyGregorianChronologyJulianChronologyIslamicChronologyBuddhistChronologyGJChronology| Constructor and Description |
|---|
JodaLocalDateSerializer() |
| Modifier and Type | Method and Description |
|---|---|
org.joda.time.LocalDate |
read(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
Class<org.joda.time.LocalDate> type) |
void |
write(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output,
org.joda.time.LocalDate localDate) |
public org.joda.time.LocalDate read(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
Class<org.joda.time.LocalDate> type)
read in class com.esotericsoftware.kryo.Serializer<org.joda.time.LocalDate>public void write(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output,
org.joda.time.LocalDate localDate)
write in class com.esotericsoftware.kryo.Serializer<org.joda.time.LocalDate>Copyright © 2010-2015. All Rights Reserved.