docs: public void write(InputStream is, long length, boolean escape, boolean noBackslashEscapes)
        throws IOException {
      byte[] array = new byte[4096];
      int len;
      while (length > 0 && (len = is.read(array, 0, Math.min(4096, (int) length))) > 0) {
        if (escape) {
          writeBytesEscaped(array, len, noBackslashEscapes);
        } else {
          write(array, 0, len);
        }
        length -= len;
      }
    }