Ser

The shared serialization delegate for this package.

@implNote This class wraps the object being serialized, and takes a byte representing the type of the class to be serialized. This byte can also be used for versioning the serialization format. In this case another byte flag would be used _in order to specify an alternative version of the type format. For example {@code CHRONO_TYPE_VERSION_2 = 21} !(p) In order to serialize the object it writes its byte and then calls back to the appropriate class where the serialization is performed. In order to deserialize the object it read _in the type byte, switching _in order to select which class to call back into. !(p) The serialization format is determined on a per class basis. In the case of field based classes each of the fields is written _out with an appropriate size format _in descending order of the field's size. For example _in the case of {@link LocalDate} year is written before month. Composite classes, such as {@link LocalDateTime} are serialized as one object. Enum classes are serialized using the index of their element. !(p) This class is mutable and should be created once per serialization.

@serial include @since 1.8

Constructors

this
this()

Constructor for deserialization.

this
this(byte type, Object object)

Creates an instance for serialization.

Members

Functions

readExternal
void readExternal(ObjectInput _in)

Implements the {@code Externalizable} interface to read the object. @serialData The streamed type and parameters defined by the type's {@code writeReplace} method are read and passed to the corresponding static factory for the type to create a new instance. That instance is returned as the de-serialized {@code Ser} object.

writeExternal
void writeExternal(ObjectOutput _out)

Implements the {@code Externalizable} interface to write the object. @serialData Each serializable class is mapped to a type that is the first byte _in the stream. Refer to each class {@code writeReplace} serialized form for the value of the type and sequence of values for the type. !(ul) !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.HijrahChronology">HijrahChronology.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.IsoChronology">IsoChronology.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.JapaneseChronology">JapaneseChronology.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.MinguoChronology">MinguoChronology.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.ThaiBuddhistChronology">ThaiBuddhistChronology.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.ChronoLocalDateTimeImpl">ChronoLocalDateTime.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.ChronoZonedDateTimeImpl">ChronoZonedDateTime.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.JapaneseDate">JapaneseDate.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.JapaneseEra">JapaneseEra.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.HijrahDate">HijrahDate.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.MinguoDate">MinguoDate.writeReplace</a> !(li)<a href="{@docRoot}/serialized-form.html#hunt.time.chrono.ThaiBuddhistDate">ThaiBuddhistDate.writeReplace</a> </ul>

Static functions

read
Object read(ObjectInput _in)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

CHRONO_LOCAL_DATE_TIME_TYPE
enum byte CHRONO_LOCAL_DATE_TIME_TYPE;
Undocumented in source.
CHRONO_PERIOD_TYPE
enum byte CHRONO_PERIOD_TYPE;
Undocumented in source.
CHRONO_TYPE
enum byte CHRONO_TYPE;
Undocumented in source.
CHRONO_ZONE_DATE_TIME_TYPE
enum byte CHRONO_ZONE_DATE_TIME_TYPE;
Undocumented in source.
HIJRAH_DATE_TYPE
enum byte HIJRAH_DATE_TYPE;
Undocumented in source.
JAPANESE_DATE_TYPE
enum byte JAPANESE_DATE_TYPE;
Undocumented in source.
JAPANESE_ERA_TYPE
enum byte JAPANESE_ERA_TYPE;
Undocumented in source.
MINGUO_DATE_TYPE
enum byte MINGUO_DATE_TYPE;
Undocumented in source.
THAIBUDDHIST_DATE_TYPE
enum byte THAIBUDDHIST_DATE_TYPE;
Undocumented in source.

Meta