docs: int readResults(byte[] b, int bPos, int bAvail) {
          if (buffer != null) {
              int len = Math.min(avail(), bAvail);
              if (buffer != b) {
                  System.arraycopy(buffer, readPos, b, bPos, len);
                  readPos += len;
                  if (readPos >= pos) {
                      buffer = null;
                  }
              } else {
                  // Re-using the original consumer's output array is only
                  // allowed for one round.
                  buffer = null;
              }
              return len;
          }
          return eof ? -1 : 0;
      }