public static List < String > getValues ( String csvRow ) { List < String > values = new ArrayList < String > ( ) ; StringReader in = new StringReader ( csvRow ) ; String value ; try { value = nextValue ( in ) ; while ( true ) { values . add ( value ) ; value = nextValue ( in ) ; } } catch ( IOException e ) { // TODO handle case of final null value better? if ( csvRow . lastIndexOf ( ' ' ) == csvRow . length ( ) - 1 ) values . add ( null ) ; return values ; } }
Returns values from a CSV String .