public long skipUntil(char c) throws IllegalArgumentException, IOException {
        if (lookaheadChar == UNDEFINED) {
            lookaheadChar = super.read();
        }
        long counter = 0;
        while (lookaheadChar != c && lookaheadChar != END_OF_STREAM) {
            if (lookaheadChar == '\n') {
                lineCounter++;
            }
            lookaheadChar = super.read();
            counter++;
        }
        return counter;
    }