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.math.BigDecimal; |
79 import java.math.BigDecimal; |
80 import java.math.BigInteger; |
80 import java.math.BigInteger; |
81 import java.math.RoundingMode; |
81 import java.math.RoundingMode; |
82 import java.time.format.DateTimeParseException; |
82 import java.time.format.DateTimeParseException; |
1297 |
1297 |
1298 //----------------------------------------------------------------------- |
1298 //----------------------------------------------------------------------- |
1299 /** |
1299 /** |
1300 * Writes the object using a |
1300 * Writes the object using a |
1301 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
1301 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
|
1302 * @serialData |
1302 * <pre> |
1303 * <pre> |
1303 * out.writeByte(1); // identifies this as a Duration |
1304 * out.writeByte(1); // identifies a Duration |
1304 * out.writeLong(seconds); |
1305 * out.writeLong(seconds); |
1305 * out.writeInt(nanos); |
1306 * out.writeInt(nanos); |
1306 * </pre> |
1307 * </pre> |
1307 * |
1308 * |
1308 * @return the instance of {@code Ser}, not null |
1309 * @return the instance of {@code Ser}, not null |
1314 /** |
1315 /** |
1315 * Defend against malicious streams. |
1316 * Defend against malicious streams. |
1316 * @return never |
1317 * @return never |
1317 * @throws InvalidObjectException always |
1318 * @throws InvalidObjectException always |
1318 */ |
1319 */ |
1319 private Object readResolve() throws ObjectStreamException { |
1320 private Object readResolve() throws InvalidObjectException { |
1320 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1321 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1321 } |
1322 } |
1322 |
1323 |
1323 void writeExternal(DataOutput out) throws IOException { |
1324 void writeExternal(DataOutput out) throws IOException { |
1324 out.writeLong(seconds); |
1325 out.writeLong(seconds); |