/** * Constructs a new <tt>AbstractCsvReader</tt>, using the default {@link Tokenizer}. * * @param reader * the reader * @param preferences * the CSV preferences * @throws NullPointerException * if reader or preferences are null */ public AbstractCsvReader(final Reader reader, final CsvPreference preferences) { if( reader == null ) { throw new NullPointerException("reader should not be null"); } else if( preferences == null ) { throw new NullPointerException("preferences should not be null"); } this.preferences = preferences; this.tokenizer = new Tokenizer(reader, preferences); }
line = readLine(); if( line == null ) { return false; // EOF appendSpaces(currentColumn, potentialSpaces); if (maxLinesPerRow > 0 && getLineNumber() - quoteScopeStartingLine + 1 >= maxLinesPerRow) { getLineNumber()) : String.format("max number of lines to read exceeded while reading quoted column" + " beginning on line %d and ending on line %d", quoteScopeStartingLine, getLineNumber()); throw new SuperCsvException(msg); else if( (line = readLine()) == null ) { throw new SuperCsvException( String .format( "unexpected end of file while reading quoted column beginning on line %d and ending on line %d", quoteScopeStartingLine, getLineNumber())); appendSpaces(currentColumn, potentialSpaces); quoteScopeStartingLine = getLineNumber(); appendSpaces(currentColumn, potentialSpaces); appendSpaces(currentColumn, potentialSpaces);