MCPcopy Create free account
hub / github.com/MenoData/Time4J / readExternal

Method readExternal

base/src/main/java/net/time4j/SPX.java:199–234  ·  view source on GitHub ↗
(ObjectInput in)

Source from the content-addressed store, hash-verified

197 * @throws ClassNotFoundException if class-loading fails
198 */
199 @Override
200 public void readExternal(ObjectInput in)
201 throws IOException, ClassNotFoundException {
202
203 byte header = in.readByte();
204
205 switch ((header & 0xFF) >> 4) {
206 case DATE_TYPE:
207 this.obj = this.readDate(in, header);
208 break;
209 case TIME_TYPE:
210 this.obj = this.readTime(in);
211 break;
212 case WEEKMODEL_TYPE:
213 this.obj = this.readWeekmodel(in, header);
214 break;
215 case MOMENT_TYPE:
216 this.obj = this.readMoment(in, header);
217 break;
218 case MACHINE_TIME_TYPE:
219 this.obj = this.readMachineTime(in, header);
220 break;
221 case DURATION_TYPE:
222 this.obj = this.readDuration(in, header);
223 break;
224 case DAY_PERIOD_TYPE:
225 this.obj = this.readDayPeriod(in, header);
226 break;
227 case TIMESTAMP_TYPE:
228 this.obj = this.readTimestamp(in, header);
229 break;
230 default:
231 throw new StreamCorruptedException("Unknown serialized type.");
232 }
233
234 }
235
236 private Object readResolve() throws ObjectStreamException {
237

Callers

nothing calls this directly

Calls 8

readDateMethod · 0.95
readTimeMethod · 0.95
readWeekmodelMethod · 0.95
readMomentMethod · 0.95
readMachineTimeMethod · 0.95
readDurationMethod · 0.95
readDayPeriodMethod · 0.95
readTimestampMethod · 0.95

Tested by

no test coverage detected