equal
deleted
inserted
replaced
117 } |
117 } |
118 |
118 |
119 //----------------------------------------------------------------------- |
119 //----------------------------------------------------------------------- |
120 /** |
120 /** |
121 * Implements the {@code Externalizable} interface to write the object. |
121 * Implements the {@code Externalizable} interface to write the object. |
|
122 * @serialData |
|
123 * Each serializable class is mapped to a type that is the first byte |
|
124 * in the stream. Refer to each class {@code writeReplace} |
|
125 * serialized form for the value of the type and sequence of values for the type. |
|
126 * |
|
127 * <ul> |
|
128 * <li><a href="../../../serialized-form.html#java.time.zone.ZoneRules">ZoneRules.writeReplace</a> |
|
129 * <li><a href="../../../serialized-form.html#java.time.zone.ZoneOffsetTransition">ZoneOffsetTransition.writeReplace</a> |
|
130 * <li><a href="../../../serialized-form.html#java.time.zone.ZoneOffsetTransitionRule">ZoneOffsetTransitionRule.writeReplace</a> |
|
131 * </ul> |
122 * |
132 * |
123 * @param out the data stream to write to, not null |
133 * @param out the data stream to write to, not null |
124 */ |
134 */ |
|
135 @Override |
125 public void writeExternal(ObjectOutput out) throws IOException { |
136 public void writeExternal(ObjectOutput out) throws IOException { |
126 writeInternal(type, object, out); |
137 writeInternal(type, object, out); |
127 } |
138 } |
128 |
139 |
129 static void write(Object object, DataOutput out) throws IOException { |
140 static void write(Object object, DataOutput out) throws IOException { |
148 } |
159 } |
149 |
160 |
150 //----------------------------------------------------------------------- |
161 //----------------------------------------------------------------------- |
151 /** |
162 /** |
152 * Implements the {@code Externalizable} interface to read the object. |
163 * Implements the {@code Externalizable} interface to read the object. |
153 * |
164 * @serialData |
|
165 * The streamed type and parameters defined by the type's {@code writeReplace} |
|
166 * method are read and passed to the corresponding static factory for the type |
|
167 * to create a new instance. That instance is returned as the de-serialized |
|
168 * {@code Ser} object. |
|
169 * |
|
170 * <ul> |
|
171 * <li><a href="../../../serialized-form.html#java.time.zone.ZoneRules">ZoneRules</a> |
|
172 * - {@code ZoneRules.of(standardTransitions, standardOffsets, savingsInstantTransitions, wallOffsets, lastRules);} |
|
173 * <li><a href="../../../serialized-form.html#java.time.zone.ZoneOffsetTransition">ZoneOffsetTransition</a> |
|
174 * - {@code ;} |
|
175 * <li><a href="../../../serialized-form.html#java.time.zone.ZoneOffsetTransitionRule">ZoneOffsetTransitionRule</a> |
|
176 * - {@code ;} |
|
177 * </ul> |
154 * @param in the data to read, not null |
178 * @param in the data to read, not null |
155 */ |
179 */ |
|
180 @Override |
156 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { |
181 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { |
157 type = in.readByte(); |
182 type = in.readByte(); |
158 object = readInternal(type, in); |
183 object = readInternal(type, in); |
159 } |
184 } |
160 |
185 |