private void readObject(ObjectInputStream s) throws InvalidObjectException {
throw new InvalidObjectException("Deserialization via serialization delegate");
}
void writeExternal(DataOutput out) throws IOException {
dateTime.writeExternal(out);
offset.writeExternal(out);
zone.write(out);
}
static ZonedDateTime readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
LocalDateTime dateTime = LocalDateTime.readExternal(in);
ZoneOffset offset = ZoneOffset.readExternal(in);
ZoneId zone = (ZoneId) Ser.read(in);
return ZonedDateTime.ofLenient(dateTime, offset, zone);
}
|