equal
deleted
inserted
replaced
74 |
74 |
75 import java.io.DataInput; |
75 import java.io.DataInput; |
76 import java.io.DataOutput; |
76 import java.io.DataOutput; |
77 import java.io.IOException; |
77 import java.io.IOException; |
78 import java.io.InvalidObjectException; |
78 import java.io.InvalidObjectException; |
79 import java.io.ObjectStreamException; |
79 import java.io.InvalidObjectException; |
80 import java.io.Serializable; |
80 import java.io.Serializable; |
81 import java.time.format.DateTimeFormatter; |
81 import java.time.format.DateTimeFormatter; |
82 import java.time.format.DateTimeParseException; |
82 import java.time.format.DateTimeParseException; |
83 import java.time.temporal.ChronoField; |
83 import java.time.temporal.ChronoField; |
84 import java.time.temporal.ChronoUnit; |
84 import java.time.temporal.ChronoUnit; |
1315 |
1315 |
1316 // ----------------------------------------------------------------------- |
1316 // ----------------------------------------------------------------------- |
1317 /** |
1317 /** |
1318 * Writes the object using a |
1318 * Writes the object using a |
1319 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
1319 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
|
1320 * @serialData |
1320 * <pre> |
1321 * <pre> |
1321 * out.writeByte(2); // identifies this as an Instant |
1322 * out.writeByte(2); // identifies an Instant |
1322 * out.writeLong(seconds); |
1323 * out.writeLong(seconds); |
1323 * out.writeInt(nanos); |
1324 * out.writeInt(nanos); |
1324 * </pre> |
1325 * </pre> |
1325 * |
1326 * |
1326 * @return the instance of {@code Ser}, not null |
1327 * @return the instance of {@code Ser}, not null |
1332 /** |
1333 /** |
1333 * Defend against malicious streams. |
1334 * Defend against malicious streams. |
1334 * @return never |
1335 * @return never |
1335 * @throws InvalidObjectException always |
1336 * @throws InvalidObjectException always |
1336 */ |
1337 */ |
1337 private Object readResolve() throws ObjectStreamException { |
1338 private Object readResolve() throws InvalidObjectException { |
1338 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1339 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1339 } |
1340 } |
1340 |
1341 |
1341 void writeExternal(DataOutput out) throws IOException { |
1342 void writeExternal(DataOutput out) throws IOException { |
1342 out.writeLong(seconds); |
1343 out.writeLong(seconds); |