docs: protected void maybeConsolidateBuffer() throws IOException {
          if (bufferLimit == buffer.length &&
              bufferOffset > 0 &&
              bufferOffset >= (buffer.length - CONSOLIDATE_LINE_ON) &&
              !preLoaded &&
              !bufferLineEnd) {
  
              // A: copy the remainder to the start of the buffer.
              int len = bufferLimit - bufferOffset;
              if (len > 0) {
                  System.arraycopy(buffer, bufferOffset, buffer, 0, len);
              }
  
              int off = len;
              char[] b = new char[1];
              while (off < buffer.length && reader.read(b, 0, 1) > 0) {
                  char ch = b[0];
                  buffer[off] = ch;
                  ++off;
                  if (ch == '\n') {
                      bufferLineEnd = true;
                      break;
                  }
              }
  
              bufferOffset = 0;
              bufferLimit = off;
          }
      }