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.format.DateTimeFormatter; |
79 import java.time.format.DateTimeFormatter; |
80 import java.time.format.DateTimeParseException; |
80 import java.time.format.DateTimeParseException; |
81 import java.time.temporal.ChronoField; |
81 import java.time.temporal.ChronoField; |
82 import java.time.temporal.ChronoUnit; |
82 import java.time.temporal.ChronoUnit; |
1593 |
1593 |
1594 //----------------------------------------------------------------------- |
1594 //----------------------------------------------------------------------- |
1595 /** |
1595 /** |
1596 * Writes the object using a |
1596 * Writes the object using a |
1597 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
1597 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
|
1598 * @serialData |
|
1599 * A twos-complement value indicates the remaining values are not in the stream |
|
1600 * and should be set to zero. |
1598 * <pre> |
1601 * <pre> |
1599 * out.writeByte(4); // identifies this as a LocalTime |
1602 * out.writeByte(4); // identifies a LocalTime |
1600 * if (nano == 0) { |
1603 * if (nano == 0) { |
1601 * if (second == 0) { |
1604 * if (second == 0) { |
1602 * if (minute == 0) { |
1605 * if (minute == 0) { |
1603 * out.writeByte(~hour); |
1606 * out.writeByte(~hour); |
1604 * } else { |
1607 * } else { |
1627 /** |
1630 /** |
1628 * Defend against malicious streams. |
1631 * Defend against malicious streams. |
1629 * @return never |
1632 * @return never |
1630 * @throws InvalidObjectException always |
1633 * @throws InvalidObjectException always |
1631 */ |
1634 */ |
1632 private Object readResolve() throws ObjectStreamException { |
1635 private Object readResolve() throws InvalidObjectException { |
1633 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1636 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1634 } |
1637 } |
1635 |
1638 |
1636 void writeExternal(DataOutput out) throws IOException { |
1639 void writeExternal(DataOutput out) throws IOException { |
1637 if (nano == 0) { |
1640 if (nano == 0) { |