jdk/src/share/classes/java/time/LocalDateTime.java
changeset 19841 15c8e97d6a14
parent 19030 32f129cb6351
child 20517 1336a85b3d52
equal deleted inserted replaced
19822:4e10a58fa28f 19841:15c8e97d6a14
    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.chrono.ChronoLocalDateTime;
    81 import java.time.chrono.ChronoLocalDateTime;
    82 import java.time.format.DateTimeFormatter;
    82 import java.time.format.DateTimeFormatter;
    83 import java.time.format.DateTimeParseException;
    83 import java.time.format.DateTimeParseException;
    84 import java.time.temporal.ChronoField;
    84 import java.time.temporal.ChronoField;
  1951 
  1951 
  1952     //-----------------------------------------------------------------------
  1952     //-----------------------------------------------------------------------
  1953     /**
  1953     /**
  1954      * Writes the object using a
  1954      * Writes the object using a
  1955      * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>.
  1955      * <a href="../../serialized-form.html#java.time.Ser">dedicated serialized form</a>.
       
  1956      * @serialData
  1956      * <pre>
  1957      * <pre>
  1957      *  out.writeByte(5);  // identifies this as a LocalDateTime
  1958      *  out.writeByte(5);  // identifies a LocalDateTime
  1958      *  // the <a href="../../serialized-form.html#java.time.LocalDate">date</a> excluding the one byte header
  1959      *  // the <a href="../../serialized-form.html#java.time.LocalDate">date</a> excluding the one byte header
  1959      *  // the <a href="../../serialized-form.html#java.time.LocalTime">time</a> excluding the one byte header
  1960      *  // the <a href="../../serialized-form.html#java.time.LocalTime">time</a> excluding the one byte header
  1960      * </pre>
  1961      * </pre>
  1961      *
  1962      *
  1962      * @return the instance of {@code Ser}, not null
  1963      * @return the instance of {@code Ser}, not null
  1968     /**
  1969     /**
  1969      * Defend against malicious streams.
  1970      * Defend against malicious streams.
  1970      * @return never
  1971      * @return never
  1971      * @throws InvalidObjectException always
  1972      * @throws InvalidObjectException always
  1972      */
  1973      */
  1973     private Object readResolve() throws ObjectStreamException {
  1974     private Object readResolve() throws InvalidObjectException {
  1974         throw new InvalidObjectException("Deserialization via serialization delegate");
  1975         throw new InvalidObjectException("Deserialization via serialization delegate");
  1975     }
  1976     }
  1976 
  1977 
  1977     void writeExternal(DataOutput out) throws IOException {
  1978     void writeExternal(DataOutput out) throws IOException {
  1978         date.writeExternal(out);
  1979         date.writeExternal(out);