docs: private byte[] read(int length) throws IOException {
      byte[] result = new byte[length];
  
      int read = 0;
      while (read < length) {
        int i = this.in.read(result, read, length - read);
        if (i == -1)
          throw new EOFException();
        read += i;
      }
  
      return result;
    }