class ExtendedBufferedReader extends BufferedReader {

    @Override
    public String readLine() throws IOException {
        final String line = super.readLine();

        if (line != null) {
            lastChar = LF; // needed for detecting start of line
            eolCounter++;
        } else {
            lastChar = END_OF_STREAM;
        }

        return line;
    }

      ExtendedBufferedReader(final Reader reader);

}