code: @Override
    public boolean ready() throws IOException {
      synchronized (lock) {
        ensureOpen();
  
        /*
         * If newline needs to be skipped and the next char to be read is a
         * newline character, then just skip it right away.
         */
        if (skipLF) {
          /*
           * Note that in.ready() will return true if and only if the next read on
           * the stream will not block.
           */
          if (nextChar >= nChars && in.ready()) {
            fill();
          }
          if (nextChar < nChars) {
            if (cb[nextChar] == '\n')
              nextChar++;
            skipLF = false;
          }
        }
        return (nextChar < nChars) || in.ready();
      }
    }
docs: /*
  (non-Javadoc)
  
  @see java.io.Reader#ready()