question: private String [ ] parseLine ( String nextLine , boolean multi ) throws IOException { if ( ! multi && pending != null ) { pending = null ; } if ( nextLine == null ) { if ( pending != null ) { String s = pending ; pending = null ; return new String [ ] { s } ; } else { return null ; } } List < String > tokensOnThisLine = new ArrayList < > ( ) ; StringBuilder sb = new StringBuilder ( INITIAL_READ_SIZE ) ; boolean inQuotes = false ; boolean fromQuotedField = false ; if ( pending != null ) { sb . append ( pending ) ; pending = null ; inQuotes = ! this . ignoreQuotations ; } for ( int i = 0 ; i < nextLine . length ( ) ; i ++ ) { char c = nextLine . charAt ( i ) ; if ( c == this . escape ) { if ( isNextCharacterEscapable ( nextLine , inQuotes ( inQuotes ) , i ) ) { i = appendNextCharacterAndAdvanceLoop ( nextLine , sb , i ) ; } } else if ( c == quotechar ) { if ( isNextCharacterEscapedQuote ( nextLine , inQuotes ( inQuotes ) , i ) ) { i = appendNextCharacterAndAdvanceLoop ( nextLine , sb , i ) ; } else { inQuotes = ! inQuotes ; if ( atStartOfField ( sb ) ) { fromQuotedField = true ; } if ( ! strictQuotes ) { if ( i > 2 && nextLine . charAt ( i - 1 ) != this . separator && nextLine . length ( ) > ( i + 1 ) && nextLine . charAt ( i + 1 ) != this . separator ) { if ( ignoreLeadingWhiteSpace && sb . length ( ) > 0 && isAllWhiteSpace ( sb ) ) { sb . setLength ( 0 ) ; } else { sb . append ( c ) ; } } } } inField = ! inField ; } else if ( c == separator && ! ( inQuotes && ! ignoreQuotations ) ) { tokensOnThisLine . add ( convertEmptyToNullIfNeeded ( sb . toString ( ) , fromQuotedField ) ) ; fromQuotedField = false ; sb . setLength ( 0 ) ; inField = false ; } else { if ( ! strictQuotes || ( inQuotes && ! ignoreQuotations ) ) { sb . append ( c ) ; inField = true ; fromQuotedField = true ; } } } if ( ( inQuotes && ! ignoreQuotations ) ) { if ( multi ) { sb . append ( '\n' ) ; pending = sb . toString ( ) ; sb = null ; } else { throw new IOException ( "Un-terminated quoted field at end of CSV line" ) ; } if ( inField ) { fromQuotedField = true ; } } else { inField = false ; } if ( sb != null ) { tokensOnThisLine . add ( convertEmptyToNullIfNeeded ( sb . toString ( ) , fromQuotedField ) ) ; fromQuotedField = false ; } return tokensOnThisLine . toArray ( new String [ tokensOnThisLine . size ( ) ] ) ; }
target:  Parses an incoming String and returns an array of elements.