Package javax.time.calendar.zone
Class Ser
java.lang.Object
javax.time.calendar.zone.Ser
- All Implemented Interfaces:
Externalizable
,Serializable
The shared serialization delegate for this package.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final byte
Type for FixedZoneRules.private Object
The object being serialized.(package private) static final byte
Type for StandardZoneRules.private byte
The type being serialized.(package private) static final byte
Type for ZoneOffsetTransition.(package private) static final byte
Type for ZoneOffsetTransition. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Object
(package private) static long
Reads the state from the stream.void
private static Object
readInternal
(byte type, DataInput in) (package private) static ZoneOffset
readOffset
(DataInput in) Reads the state from the stream.private Object
Returns the object that will replace this one.(package private) static void
write
(Object object, DataOutput out) (package private) static void
writeEpochSecs
(long epochSecs, DataOutput out) Writes the state to the stream.void
private static void
writeInternal
(byte type, Object object, DataOutput out) (package private) static void
writeOffset
(ZoneOffset offset, DataOutput out) Writes the state to the stream.
-
Field Details
-
FZR
static final byte FZRType for FixedZoneRules.- See Also:
-
SZR
static final byte SZRType for StandardZoneRules.- See Also:
-
ZOT
static final byte ZOTType for ZoneOffsetTransition.- See Also:
-
ZOTRULE
static final byte ZOTRULEType for ZoneOffsetTransition.- See Also:
-
type
private byte typeThe type being serialized. -
object
The object being serialized.
-
-
Constructor Details
-
Ser
public Ser()Constructor for serialization. -
Ser
Ser(byte type, Object object) Constructor.- Parameters:
type
- the typeobject
- the object
-
-
Method Details
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
write
- Throws:
IOException
-
writeInternal
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
read
- Throws:
IOException
ClassNotFoundException
-
readInternal
private static Object readInternal(byte type, DataInput in) throws IOException, ClassNotFoundException - Throws:
IOException
ClassNotFoundException
-
readResolve
Returns the object that will replace this one.- Returns:
- the read object, should never be null
-
writeOffset
Writes the state to the stream.- Parameters:
offset
- the offset, not nullout
- the output stream, not null- Throws:
IOException
- if an error occurs
-
readOffset
Reads the state from the stream.- Parameters:
in
- the input stream, not null- Returns:
- the created object, never null
- Throws:
IOException
- if an error occurs
-
writeEpochSecs
Writes the state to the stream.- Parameters:
epochSecs
- the epoch seconds, not nullout
- the output stream, not null- Throws:
IOException
- if an error occurs
-
readEpochSecs
Reads the state from the stream.- Parameters:
in
- the input stream, not null- Returns:
- the epoch seconds, never null
- Throws:
IOException
- if an error occurs
-