public static @NotNull Hash read(@NotNull DataInput in) throws IOException {
    int length = DataInputOutputUtil.readINT(in);
    if (length == 0) throw new IOException("Can not read hash: data length is zero");
    byte[] buf = new byte[length];
    in.readFully(buf);
    return new HashImpl(buf);
  }
public static @NotNull Hash read(@NotNull DataInput in)