private static @NotNull DataInputStream toDataInputStream(byte @NotNull[] buffer, int offset, int length) {
    return new DataInputStream(new UnsyncByteArrayInputStream(buffer, offset, length));
  }
private static @NotNull DataInputStream toDataInputStream(byte @NotNull[] buffer, int offset, int length)