Class Ser

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable

    final class Ser
    extends java.lang.Object
    implements java.io.Externalizable
    The shared serialization delegate for this package.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static byte FZR
      Type for FixedZoneRules.
      private java.lang.Object object
      The object being serialized.
      (package private) static byte SZR
      Type for StandardZoneRules.
      private byte type
      The type being serialized.
      (package private) static byte ZOT
      Type for ZoneOffsetTransition.
      (package private) static byte ZOTRULE
      Type for ZoneOffsetTransition.
    • Constructor Summary

      Constructors 
      Constructor Description
      Ser()
      Constructor for serialization.
      Ser​(byte type, java.lang.Object object)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.Object read​(java.io.DataInput in)  
      (package private) static long readEpochSecs​(java.io.DataInput in)
      Reads the state from the stream.
      void readExternal​(java.io.ObjectInput in)  
      private static java.lang.Object readInternal​(byte type, java.io.DataInput in)  
      (package private) static ZoneOffset readOffset​(java.io.DataInput in)
      Reads the state from the stream.
      private java.lang.Object readResolve()
      Returns the object that will replace this one.
      (package private) static void write​(java.lang.Object object, java.io.DataOutput out)  
      (package private) static void writeEpochSecs​(long epochSecs, java.io.DataOutput out)
      Writes the state to the stream.
      void writeExternal​(java.io.ObjectOutput out)  
      private static void writeInternal​(byte type, java.lang.Object object, java.io.DataOutput out)  
      (package private) static void writeOffset​(ZoneOffset offset, java.io.DataOutput out)
      Writes the state to the stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • type

        private byte type
        The type being serialized.
      • object

        private java.lang.Object object
        The object being serialized.
    • Constructor Detail

      • Ser

        public Ser()
        Constructor for serialization.
      • Ser

        Ser​(byte type,
            java.lang.Object object)
        Constructor.
        Parameters:
        type - the type
        object - the object
    • Method Detail

      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • write

        static void write​(java.lang.Object object,
                          java.io.DataOutput out)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • writeInternal

        private static void writeInternal​(byte type,
                                          java.lang.Object object,
                                          java.io.DataOutput out)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • read

        static java.lang.Object read​(java.io.DataInput in)
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • readInternal

        private static java.lang.Object readInternal​(byte type,
                                                     java.io.DataInput in)
                                              throws java.io.IOException,
                                                     java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • readResolve

        private java.lang.Object readResolve()
        Returns the object that will replace this one.
        Returns:
        the read object, should never be null
      • writeOffset

        static void writeOffset​(ZoneOffset offset,
                                java.io.DataOutput out)
                         throws java.io.IOException
        Writes the state to the stream.
        Parameters:
        offset - the offset, not null
        out - the output stream, not null
        Throws:
        java.io.IOException - if an error occurs
      • readOffset

        static ZoneOffset readOffset​(java.io.DataInput in)
                              throws java.io.IOException
        Reads the state from the stream.
        Parameters:
        in - the input stream, not null
        Returns:
        the created object, never null
        Throws:
        java.io.IOException - if an error occurs
      • writeEpochSecs

        static void writeEpochSecs​(long epochSecs,
                                   java.io.DataOutput out)
                            throws java.io.IOException
        Writes the state to the stream.
        Parameters:
        epochSecs - the epoch seconds, not null
        out - the output stream, not null
        Throws:
        java.io.IOException - if an error occurs
      • readEpochSecs

        static long readEpochSecs​(java.io.DataInput in)
                           throws java.io.IOException
        Reads the state from the stream.
        Parameters:
        in - the input stream, not null
        Returns:
        the epoch seconds, never null
        Throws:
        java.io.IOException - if an error occurs