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 byteType for FixedZoneRules.private ObjectThe object being serialized.(package private) static final byteType for StandardZoneRules.private byteThe type being serialized.(package private) static final byteType for ZoneOffsetTransition.(package private) static final byteType for ZoneOffsetTransition. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Object(package private) static longReads the state from the stream.voidprivate static ObjectreadInternal(byte type, DataInput in) (package private) static ZoneOffsetreadOffset(DataInput in) Reads the state from the stream.private ObjectReturns the object that will replace this one.(package private) static voidwrite(Object object, DataOutput out) (package private) static voidwriteEpochSecs(long epochSecs, DataOutput out) Writes the state to the stream.voidprivate static voidwriteInternal(byte type, Object object, DataOutput out) (package private) static voidwriteOffset(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
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
write
- Throws:
IOException
-
writeInternal
- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
read
- Throws:
IOExceptionClassNotFoundException
-
readInternal
private static Object readInternal(byte type, DataInput in) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
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
-