boolean readEndOfLine()

in src/main/java/org/apache/commons/csv/Lexer.java [448:469]


    boolean readEndOfLine(final int ch) throws IOException {
        // check if we have \r\n...
        int cur = ch;
        if (cur == Constants.CR && reader.peek() == Constants.LF) {
            // note: does not change ch outside of this method!
            cur = reader.read();
            // Save the EOL state
            if (firstEol == null) {
                this.firstEol = Constants.CRLF;
            }
        }
        // save EOL state here.
        if (firstEol == null) {
            if (cur == Constants.LF) {
                this.firstEol = LF_STRING;
            } else if (cur == Constants.CR) {
                this.firstEol = CR_STRING;
            }
        }

        return cur == Constants.LF || cur == Constants.CR;
    }