code: @Override
      public int read() throws IOException {
          // initalize the lookahead
          if (lookaheadChar == UNDEFINED) {
              lookaheadChar = super.read();
          }
          lastChar = lookaheadChar;
          if (super.ready()) {
              lookaheadChar = super.read();
          } else {
              lookaheadChar = UNDEFINED;
          }
          if (lastChar == '\n') {
              lineCounter++;
          }
          return lastChar;
      }
docs: Reads the next char from the input stream.
  @return the next char or END_OF_STREAM if end of stream has been reached.