equal
deleted
inserted
replaced
67 |
67 |
68 import java.io.DataOutput; |
68 import java.io.DataOutput; |
69 import java.io.IOException; |
69 import java.io.IOException; |
70 import java.io.InvalidObjectException; |
70 import java.io.InvalidObjectException; |
71 import java.io.ObjectInput; |
71 import java.io.ObjectInput; |
72 import java.io.ObjectStreamException; |
72 import java.io.InvalidObjectException; |
73 import java.io.Serializable; |
73 import java.io.Serializable; |
74 import java.time.chrono.ChronoZonedDateTime; |
74 import java.time.chrono.ChronoZonedDateTime; |
75 import java.time.format.DateTimeFormatter; |
75 import java.time.format.DateTimeFormatter; |
76 import java.time.format.DateTimeParseException; |
76 import java.time.format.DateTimeParseException; |
77 import java.time.temporal.ChronoField; |
77 import java.time.temporal.ChronoField; |
2190 |
2190 |
2191 //----------------------------------------------------------------------- |
2191 //----------------------------------------------------------------------- |
2192 /** |
2192 /** |
2193 * Writes the object using a |
2193 * Writes the object using a |
2194 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
2194 * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>. |
|
2195 * @serialData |
2195 * <pre> |
2196 * <pre> |
2196 * out.writeByte(6); // identifies this as a ZonedDateTime |
2197 * out.writeByte(6); // identifies a ZonedDateTime |
2197 * // the <a href="../../serialized-form.html#java.time.LocalDateTime">date-time</a> excluding the one byte header |
2198 * // the <a href="../../serialized-form.html#java.time.LocalDateTime">dateTime</a> excluding the one byte header |
2198 * // the <a href="../../serialized-form.html#java.time.ZoneOffset">offset</a> excluding the one byte header |
2199 * // the <a href="../../serialized-form.html#java.time.ZoneOffset">offset</a> excluding the one byte header |
2199 * // the <a href="../../serialized-form.html#java.time.ZoneId">zone ID</a> excluding the one byte header |
2200 * // the <a href="../../serialized-form.html#java.time.ZoneId">zone ID</a> excluding the one byte header |
2200 * </pre> |
2201 * </pre> |
2201 * |
2202 * |
2202 * @return the instance of {@code Ser}, not null |
2203 * @return the instance of {@code Ser}, not null |
2208 /** |
2209 /** |
2209 * Defend against malicious streams. |
2210 * Defend against malicious streams. |
2210 * @return never |
2211 * @return never |
2211 * @throws InvalidObjectException always |
2212 * @throws InvalidObjectException always |
2212 */ |
2213 */ |
2213 private Object readResolve() throws ObjectStreamException { |
2214 private Object readResolve() throws InvalidObjectException { |
2214 throw new InvalidObjectException("Deserialization via serialization delegate"); |
2215 throw new InvalidObjectException("Deserialization via serialization delegate"); |
2215 } |
2216 } |
2216 |
2217 |
2217 void writeExternal(DataOutput out) throws IOException { |
2218 void writeExternal(DataOutput out) throws IOException { |
2218 dateTime.writeExternal(out); |
2219 dateTime.writeExternal(out); |