@ Cmd public void processCsvFile ( final String csvFile , final String delimiter , final char quoteChar , final Charset charset , final Closure < Void > closure ) { File f = new File ( csvFile ) ; try { config . extractFromArchive ( f , true ) ; checkState ( f . exists ( ) , "CSV file not found: " + f ) ; Reader reader = Files . newReader ( f , charset == null ? defaultCharset : charset ) ; csvDataProcessor . processFile ( reader , delimiter , quoteChar , closure ) ; } catch ( IOException ex ) { throw new IllegalStateException ( "Error reading CSV file: " + f , ex ) ; } }
Processes a CSV file .