Package org.threeten.bp.zone
Class Ser
- java.lang.Object
-
- org.threeten.bp.zone.Ser
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
final class Ser extends java.lang.Object implements java.io.ExternalizableThe shared serialization delegate for this package.Implementation notes
This class is mutable and should be created once per serialization.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectobjectThe object being serialized.private static longserialVersionUIDSerialization version.(package private) static byteSZRType for StandardZoneRules.private bytetypeThe type being serialized.(package private) static byteZOTType for ZoneOffsetTransition.(package private) static byteZOTRULEType for ZoneOffsetTransition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.Objectread(java.io.DataInput in)(package private) static longreadEpochSec(java.io.DataInput in)Reads the state from the stream.voidreadExternal(java.io.ObjectInput in)Implements theExternalizableinterface to read the object.private static java.lang.ObjectreadInternal(byte type, java.io.DataInput in)(package private) static ZoneOffsetreadOffset(java.io.DataInput in)Reads the state from the stream.private java.lang.ObjectreadResolve()Returns the object that will replace this one.(package private) static voidwrite(java.lang.Object object, java.io.DataOutput out)(package private) static voidwriteEpochSec(long epochSec, java.io.DataOutput out)Writes the state to the stream.voidwriteExternal(java.io.ObjectOutput out)Implements theExternalizableinterface to write the object.private static voidwriteInternal(byte type, java.lang.Object object, java.io.DataOutput out)(package private) static voidwriteOffset(ZoneOffset offset, java.io.DataOutput out)Writes the state to the stream.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serialization version.- See Also:
- Constant Field Values
-
SZR
static final byte SZR
Type for StandardZoneRules.- See Also:
- Constant Field Values
-
ZOT
static final byte ZOT
Type for ZoneOffsetTransition.- See Also:
- Constant Field Values
-
ZOTRULE
static final byte ZOTRULE
Type for ZoneOffsetTransition.- See Also:
- Constant Field Values
-
type
private byte type
The type being serialized.
-
object
private java.lang.Object object
The object being serialized.
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionImplements theExternalizableinterface to write the object.- Specified by:
writeExternalin interfacejava.io.Externalizable- Parameters:
out- the data stream to write to, not null- 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.ClassNotFoundExceptionImplements theExternalizableinterface to read the object.- Specified by:
readExternalin interfacejava.io.Externalizable- Parameters:
in- the data to read, not null- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
read
static java.lang.Object read(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.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.IOExceptionjava.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 nullout- 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, not null
- Throws:
java.io.IOException- if an error occurs
-
writeEpochSec
static void writeEpochSec(long epochSec, java.io.DataOutput out) throws java.io.IOExceptionWrites the state to the stream.- Parameters:
epochSec- the epoch seconds, not nullout- the output stream, not null- Throws:
java.io.IOException- if an error occurs
-
readEpochSec
static long readEpochSec(java.io.DataInput in) throws java.io.IOExceptionReads the state from the stream.- Parameters:
in- the input stream, not null- Returns:
- the epoch seconds, not null
- Throws:
java.io.IOException- if an error occurs
-
-