ret.append(String.valueOf(laChar)); String restOfLine = super.readLine();
line.append(laChar); String restOfLine = super.readLine();
  public String readLine() throws IOException {        if (lookaheadChar == UNDEFINED) {      lookaheadChar = super.read();     }        StringBuffer ret = new StringBuffer("");        // return null if end of stream has been reached    if (lookaheadChar == END_OF_STREAM) {      return null;    }    // do we have a line termination already    char laChar = (char) lookaheadChar;    if (laChar == '\n' || laChar == '\r') {      lastChar = lookaheadChar;      lookaheadChar = super.read();      // ignore '\r\n' as well      if ((char) lookaheadChar == '\n') {        lastChar = lookaheadChar;        lookaheadChar = super.read();      }      lineCounter++;      return ret.toString();    }        // create the rest-of-line return and update the lookahead    ret.append(String.valueOf(laChar));    String restOfLine = super.readLine();    lastChar = lookaheadChar;    lookaheadChar = super.read();    if (restOfLine != null) {      ret.append(restOfLine);    }    lineCounter++;    return ret.toString();  }