code: static ZoneRules readExternal(DataInput in) throws IOException, ClassNotFoundException {
          int stdSize = in.readInt();
          long[] stdTrans = (stdSize == 0) ? EMPTY_LONG_ARRAY
                                           : new long[stdSize];
          for (int i = 0; i < stdSize; i++) {
              stdTrans[i] = Ser.readEpochSec(in);
          }
          ZoneOffset[] stdOffsets = new ZoneOffset[stdSize + 1];
          for (int i = 0; i < stdOffsets.length; i++) {
              stdOffsets[i] = Ser.readOffset(in);
          }
          int savSize = in.readInt();
          long[] savTrans = (savSize == 0) ? EMPTY_LONG_ARRAY
                                           : new long[savSize];
          for (int i = 0; i < savSize; i++) {
              savTrans[i] = Ser.readEpochSec(in);
          }
          ZoneOffset[] savOffsets = new ZoneOffset[savSize + 1];
          for (int i = 0; i < savOffsets.length; i++) {
              savOffsets[i] = Ser.readOffset(in);
          }
          int ruleSize = in.readByte();
          ZoneOffsetTransitionRule[] rules = (ruleSize == 0) ?
              EMPTY_LASTRULES : new ZoneOffsetTransitionRule[ruleSize];
          for (int i = 0; i < ruleSize; i++) {
              rules[i] = ZoneOffsetTransitionRule.readExternal(in);
          }
          return new ZoneRules(stdTrans, stdOffsets, savTrans, savOffsets, rules);
      }
docs: Reads the state from the stream.
  
  @param in  the input stream, not null
  @return the created object, not null
  @throws IOException if an error occurs