public static <X> X[] read(final DataExternalizer<X> e, final DataInput in, final X[] result) {
    try {
      for (int i = 0; i < result.length; i++) {
        result[i] = e.read(in);
      }

      return result;
    }
    catch (IOException x) {
      throw new BuildDataCorruptedException(x);
    }
  }
public static <X> X[] read(final DataExternalizer<X> e, final DataInput in, final X[] result)