private static Object loadTyped(final DataInput in) {
    try {
      final byte tag = in.readByte();
      if (tag < 0) {
        // is array
        final int length = DataInputOutputUtil.readINT(in);
        final DataDescriptor descriptor = DataDescriptor.findById((byte)-tag);
        final Object array = Array.newInstance(descriptor.getDataType(), length);
        for (int idx = 0; idx < length; idx++) {
          Array.set(array, idx, descriptor.load(in));
        }
        return array;
      }
      return DataDescriptor.findById(tag).load(in);
    }
    catch (IOException e) {
      throw new BuildDataCorruptedException(e);
    }
  }
private static Object loadTyped(final DataInput in)