Package javax.time.calendar.zone
Class Ser
- java.lang.Object
-
- javax.time.calendar.zone.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.
-
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.
-
-
-
Field Detail
-
FZR
static final byte FZR
Type for FixedZoneRules.- 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.IOException
- Specified by:
writeExternal
in interfacejava.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 interfacejava.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 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, 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 nullout
- 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
-
-