docs: @Override
    public int read(byte[] bytes, int off, int len) throws IOException
    {
      Params.notNull(bytes, "Bytes");
      if(len < 0 || off < 0 || (off + len) > bytes.length) {
        throw new IndexOutOfBoundsException(Strings.concat("Array Size=", bytes.length, ", offset=", off, ", length=", len));
      }
  
      if(len == 0) {
        return 0; // Always return 0 if len == 0
      }
  
      int bytesRead = 0;
      while(len > 0) {
        if(bytesBuffer.hasRemaining()) {
          int count = Math.min(bytesBuffer.remaining(), len);
          bytesBuffer.get(bytes, off, count);
          off += count;
          len -= count;
          bytesRead += count;
        }
        else {
          fillBytesBuffer();
          if(endOfInput && !bytesBuffer.hasRemaining()) {
            break;
          }
        }
      }
  
      return bytesRead == 0 && endOfInput ? EOF : bytesRead;
    }