equal
deleted
inserted
replaced
72 |
72 |
73 import java.io.DataInput; |
73 import java.io.DataInput; |
74 import java.io.DataOutput; |
74 import java.io.DataOutput; |
75 import java.io.IOException; |
75 import java.io.IOException; |
76 import java.io.InvalidObjectException; |
76 import java.io.InvalidObjectException; |
77 import java.io.ObjectStreamException; |
77 import java.io.InvalidObjectException; |
78 import java.io.Serializable; |
78 import java.io.Serializable; |
79 import java.time.chrono.Chronology; |
79 import java.time.chrono.Chronology; |
80 import java.time.chrono.IsoChronology; |
80 import java.time.chrono.IsoChronology; |
81 import java.time.format.DateTimeFormatter; |
81 import java.time.format.DateTimeFormatter; |
82 import java.time.format.DateTimeFormatterBuilder; |
82 import java.time.format.DateTimeFormatterBuilder; |
1078 } |
1078 } |
1079 |
1079 |
1080 //----------------------------------------------------------------------- |
1080 //----------------------------------------------------------------------- |
1081 /** |
1081 /** |
1082 * Writes the object using a |
1082 * Writes the object using a |
1083 * <a href="../../../serialized-form.html#java.time.temporal.Ser">dedicated serialized form</a>. |
1083 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
|
1084 * @serialData |
1084 * <pre> |
1085 * <pre> |
1085 * out.writeByte(11); // identifies this as a Year |
1086 * out.writeByte(11); // identifies a Year |
1086 * out.writeInt(year); |
1087 * out.writeInt(year); |
1087 * </pre> |
1088 * </pre> |
1088 * |
1089 * |
1089 * @return the instance of {@code Ser}, not null |
1090 * @return the instance of {@code Ser}, not null |
1090 */ |
1091 */ |
1095 /** |
1096 /** |
1096 * Defend against malicious streams. |
1097 * Defend against malicious streams. |
1097 * @return never |
1098 * @return never |
1098 * @throws InvalidObjectException always |
1099 * @throws InvalidObjectException always |
1099 */ |
1100 */ |
1100 private Object readResolve() throws ObjectStreamException { |
1101 private Object readResolve() throws InvalidObjectException { |
1101 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1102 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1102 } |
1103 } |
1103 |
1104 |
1104 void writeExternal(DataOutput out) throws IOException { |
1105 void writeExternal(DataOutput out) throws IOException { |
1105 out.writeInt(year); |
1106 out.writeInt(year); |