code: private boolean fillBuffer(int minimum)
    {
      char[] buffer = this.buffer;
      lineStart -= pos;
      if (limit != pos) {
        limit -= pos;
        System.arraycopy( buffer, pos, buffer, 0, limit );
      } else {
        limit = 0;
      }
  
      pos = 0;
      int total;
      while ((total = in.read(buffer, limit, buffer.length - limit)) != -1) {
        limit += total;
  
        // if this is the first read, consume an optional byte order mark (BOM) if it exists
        if (lineNumber == 0 && lineStart == 0 && limit > 0 && buffer[0] == '\ufeff') {
          pos++;
          lineStart++;
          minimum++;
        }
  
        if (limit >= minimum) {
          return true;
        }
      }
      return false;
    }
docs: Returns true once {@code limit - pos >= minimum}. If the data is
  exhausted before that many characters are available, this returns
  false.