equal
deleted
inserted
replaced
76 |
76 |
77 import java.io.DataInput; |
77 import java.io.DataInput; |
78 import java.io.DataOutput; |
78 import java.io.DataOutput; |
79 import java.io.IOException; |
79 import java.io.IOException; |
80 import java.io.InvalidObjectException; |
80 import java.io.InvalidObjectException; |
81 import java.io.ObjectStreamException; |
81 import java.io.InvalidObjectException; |
82 import java.io.Serializable; |
82 import java.io.Serializable; |
83 import java.time.chrono.ChronoLocalDate; |
83 import java.time.chrono.ChronoLocalDate; |
84 import java.time.chrono.Era; |
84 import java.time.chrono.Era; |
85 import java.time.chrono.IsoChronology; |
85 import java.time.chrono.IsoChronology; |
86 import java.time.format.DateTimeFormatter; |
86 import java.time.format.DateTimeFormatter; |
2017 |
2017 |
2018 //----------------------------------------------------------------------- |
2018 //----------------------------------------------------------------------- |
2019 /** |
2019 /** |
2020 * Writes the object using a |
2020 * Writes the object using a |
2021 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
2021 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
|
2022 * @serialData |
2022 * <pre> |
2023 * <pre> |
2023 * out.writeByte(3); // identifies this as a LocalDate |
2024 * out.writeByte(3); // identifies a LocalDate |
2024 * out.writeInt(year); |
2025 * out.writeInt(year); |
2025 * out.writeByte(month); |
2026 * out.writeByte(month); |
2026 * out.writeByte(day); |
2027 * out.writeByte(day); |
2027 * </pre> |
2028 * </pre> |
2028 * |
2029 * |
2035 /** |
2036 /** |
2036 * Defend against malicious streams. |
2037 * Defend against malicious streams. |
2037 * @return never |
2038 * @return never |
2038 * @throws InvalidObjectException always |
2039 * @throws InvalidObjectException always |
2039 */ |
2040 */ |
2040 private Object readResolve() throws ObjectStreamException { |
2041 private Object readResolve() throws InvalidObjectException { |
2041 throw new InvalidObjectException("Deserialization via serialization delegate"); |
2042 throw new InvalidObjectException("Deserialization via serialization delegate"); |
2042 } |
2043 } |
2043 |
2044 |
2044 void writeExternal(DataOutput out) throws IOException { |
2045 void writeExternal(DataOutput out) throws IOException { |
2045 out.writeInt(year); |
2046 out.writeInt(year); |