code: public String readLine() throws IOException
    {
      CharBuffer cb = _cb;
  
      if (cb == null) {
        cb = _cb = new CharBuffer();
      }
      else {
        cb.length(0);
      }
  
      String result;
  
      if (readLine(cb, true)) {
        result = cb.toString();
        cb.length(0);
      }
      else if (cb.length() == 0)
        result = null;
      else {
        result = cb.toString();
        cb.length(0);
      }
  
      return result;
    }
docs: Reads a line, returning a string.