jdk/src/share/classes/java/time/OffsetTime.java
changeset 19841 15c8e97d6a14
parent 19030 32f129cb6351
child 20520 0952771e3e25
equal deleted inserted replaced
19822:4e10a58fa28f 19841:15c8e97d6a14
    71 
    71 
    72 import java.io.IOException;
    72 import java.io.IOException;
    73 import java.io.InvalidObjectException;
    73 import java.io.InvalidObjectException;
    74 import java.io.ObjectInput;
    74 import java.io.ObjectInput;
    75 import java.io.ObjectOutput;
    75 import java.io.ObjectOutput;
    76 import java.io.ObjectStreamException;
    76 import java.io.InvalidObjectException;
    77 import java.io.Serializable;
    77 import java.io.Serializable;
    78 import java.time.format.DateTimeFormatter;
    78 import java.time.format.DateTimeFormatter;
    79 import java.time.format.DateTimeParseException;
    79 import java.time.format.DateTimeParseException;
    80 import java.time.temporal.ChronoField;
    80 import java.time.temporal.ChronoField;
    81 import java.time.temporal.ChronoUnit;
    81 import java.time.temporal.ChronoUnit;
  1370     }
  1370     }
  1371 
  1371 
  1372     //-----------------------------------------------------------------------
  1372     //-----------------------------------------------------------------------
  1373     /**
  1373     /**
  1374      * Writes the object using a
  1374      * Writes the object using a
  1375      * <a href="../../../serialized-form.html#java.time.temporal.Ser">dedicated serialized form</a>.
  1375      * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>.
       
  1376      * @serialData
  1376      * <pre>
  1377      * <pre>
  1377      *  out.writeByte(9);  // identifies this as a OffsetTime
  1378      *  out.writeByte(9);  // identifies a OffsetTime
  1378      *  out.writeObject(time);
  1379      *  out.writeObject(time);
  1379      *  out.writeObject(offset);
  1380      *  out.writeObject(offset);
  1380      * </pre>
  1381      * </pre>
  1381      *
  1382      *
  1382      * @return the instance of {@code Ser}, not null
  1383      * @return the instance of {@code Ser}, not null
  1388     /**
  1389     /**
  1389      * Defend against malicious streams.
  1390      * Defend against malicious streams.
  1390      * @return never
  1391      * @return never
  1391      * @throws InvalidObjectException always
  1392      * @throws InvalidObjectException always
  1392      */
  1393      */
  1393     private Object readResolve() throws ObjectStreamException {
  1394     private Object readResolve() throws InvalidObjectException {
  1394         throw new InvalidObjectException("Deserialization via serialization delegate");
  1395         throw new InvalidObjectException("Deserialization via serialization delegate");
  1395     }
  1396     }
  1396 
  1397 
  1397     void writeExternal(ObjectOutput out) throws IOException {
  1398     void writeExternal(ObjectOutput out) throws IOException {
  1398         out.writeObject(time);
  1399         out.writeObject(time);