private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(1); // identifies this as a Duration out.writeLong(seconds); out.writeInt(nanos);
long seconds
int nanos
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(2); // identifies this as an Instant out.writeLong(seconds); out.writeInt(nanos);
long seconds
int nanos
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(3); // identifies this as a LocalDate out.writeInt(year); out.writeByte(month); out.writeByte(day);
int year
short month
short day
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(5); // identifies this as a LocalDateTime // the date excluding the one byte header // the time excluding the one byte header
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(4); // identifies this as a LocalTime if (nano == 0) { if (second == 0) { if (minute == 0) { out.writeByte(~hour); } else { out.writeByte(hour); out.writeByte(~minute); } } else { out.writeByte(hour); out.writeByte(minute); out.writeByte(~second); } } else { out.writeByte(hour); out.writeByte(minute); out.writeByte(second); out.writeInt(nano); }
byte hour
byte minute
byte second
int nano
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
Externalizable
interface to read the object.java.io.IOException
- if I/O errors occurpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
Externalizable
interface to write the object.java.io.IOException
- Includes any I/O exceptions that may occurprivate java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(6); // identifies this as a ZonedDateTime // the date-time excluding the one byte header // the offset excluding the one byte header // the zone ID excluding the one byte header
LocalDateTime dateTime
ZoneOffset offset
ZoneId zone
private java.lang.Object writeReplace()
out.writeByte(7); // identifies this as a ZoneId (not ZoneOffset) out.writeUTF(zoneId);
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(8); // identifies this as a ZoneOffset int offsetByte = totalSeconds % 900 == 0 ? totalSeconds / 900 : 127; out.writeByte(offsetByte); if (offsetByte == 127) { out.writeInt(totalSeconds); }
int totalSeconds
java.lang.String typeId
java.lang.String calendarType
java.util.HashMap<K,V> ADJUSTED_MONTH_DAYS
java.util.HashMap<K,V> ADJUSTED_MONTH_LENGTHS
java.util.HashMap<K,V> ADJUSTED_CYCLE_YEARS
long[] ADJUSTED_CYCLES
int[] ADJUSTED_MIN_VALUES
int[] ADJUSTED_LEAST_MAX_VALUES
int[] ADJUSTED_MAX_VALUES
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Externalizable
interface to read the object.java.io.IOException
- if I/O errors occurjava.lang.ClassNotFoundException
- If the class for an object being
restored cannot be found.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
Externalizable
interface to write the object.java.io.IOException
- Includes any I/O exceptions that may occurprivate java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(6); // identifies this as a Year out.writeByte(month); out.writeByte(day);
int month
int day
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(1); // identifies this as a OffsetDateTime out.writeObject(date); out.writeObject(offset);
LocalDate date
ZoneOffset offset
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(3); // identifies this as a OffsetDateTime out.writeObject(dateTime); out.writeObject(offset);
LocalDateTime dateTime
ZoneOffset offset
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(2); // identifies this as a OffsetDateTime out.writeObject(time); out.writeObject(offset);
LocalTime time
ZoneOffset offset
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Externalizable
interface to read the object.java.io.IOException
- if I/O errors occurjava.lang.ClassNotFoundException
- If the class for an object being
restored cannot be found.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
Externalizable
interface to write the object.java.io.IOException
- Includes any I/O exceptions that may occurprivate java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(10); // identifies this as a SimplePeriod out.writeLong(amount); out.writeObject(unit);
long amount
TemporalUnit unit
DayOfWeek firstDayOfWeek
int minimalDays
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(4); // identifies this as a Year out.writeInt(year);
int year
private java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.InvalidObjectException
- alwaysjava.io.ObjectStreamException
private java.lang.Object writeReplace()
out.writeByte(5); // identifies this as a Year out.writeInt(year); out.writeByte(month);
int year
int month
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Externalizable
interface to read the object.java.io.IOException
- if I/O errors occurjava.lang.ClassNotFoundException
- If the class for an object being
restored cannot be found.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
Externalizable
interface to write the object.java.io.IOException
- Includes any I/O exceptions that may occurLocalDateTime transition
ZoneOffset offsetBefore
ZoneOffset offsetAfter
Month month
byte dom
-1
is the last day of the month, -2
is the second
to last day, and so on.DayOfWeek dow
LocalTime time
boolean timeEndOfDay
ZoneOffsetTransitionRule.TimeDefinition timeDefinition
ZoneOffset standardOffset
ZoneOffset offsetBefore
ZoneOffset offsetAfter
long[] standardTransitions
ZoneOffset[] standardOffsets
long[] savingsInstantTransitions
LocalDateTime[] savingsLocalTransitions
ZoneOffset[] wallOffsets
ZoneOffsetTransitionRule[] lastRules
java.util.concurrent.ConcurrentMap<K,V> lastRulesCache