docs: public void write(final byte[] bytes, final int off, int len) throws IOException {
          byte[] buffer = this.buffer;
          final int position = this.position;
          int offSet = off;
          while (offSet < len) {
              int remaining = buffer.length - position;
              int toRead = len - offSet;
              if (toRead < remaining) {
                  System.arraycopy(bytes, offSet, buffer, position, toRead);
                  this.position = position + toRead;
                  offSet = offSet + len;
              } else {
                  System.arraycopy(bytes, offSet, buffer, position, remaining);
                  this.position += remaining;
                  flush();
                  offSet = offSet + remaining;
              }
          }
      }