public static void writeZoneRules(ZoneRules rules, DataOutputStream stream) throws IOException { ((StandardZoneRules) rules).writeExternal(stream); } }
private static void writeInternal(byte type, Object object, DataOutput out) throws IOException { out.writeByte(type); switch (type) { case SZR: ((StandardZoneRules) object).writeExternal(out); break; case ZOT: ((ZoneOffsetTransition) object).writeExternal(out); break; case ZOTRULE: ((ZoneOffsetTransitionRule) object).writeExternal(out); break; default: throw new InvalidClassException("Unknown serialized type"); } }
private static void writeInternal(byte type, Object object, DataOutput out) throws IOException { out.writeByte(type); switch (type) { case SZR: ((StandardZoneRules) object).writeExternal(out); break; case ZOT: ((ZoneOffsetTransition) object).writeExternal(out); break; case ZOTRULE: ((ZoneOffsetTransitionRule) object).writeExternal(out); break; default: throw new InvalidClassException("Unknown serialized type"); } }