/** * {@inheritDoc} */ public List<Object> executeProcessors(final CellProcessor... processors) { return super.executeProcessors(new ArrayList<Object>(getColumns().size()), processors); } }
/** * Executes the supplied cell processors on the last row of CSV that was read and populates the supplied List of * processed columns. * * @param processedColumns * the List to populate with processed columns * @param processors * the cell processors * @return the updated List * @throws NullPointerException * if processedColumns or processors is null * @throws SuperCsvConstraintViolationException * if a CellProcessor constraint failed * @throws SuperCsvException * if the wrong number of processors are supplied, or CellProcessor execution failed */ protected List<Object> executeProcessors(final List<Object> processedColumns, final CellProcessor[] processors) { Util.executeCellProcessors(processedColumns, getColumns(), processors, getLineNumber(), getRowNumber()); return processedColumns; }
/** * {@inheritDoc} */ public String[] getHeader(final boolean firstLineCheck) throws IOException { if( firstLineCheck && tokenizer.getLineNumber() != 0 ) { throw new SuperCsvException(String.format( "CSV header must be fetched as the first read operation, but %d lines have already been read", tokenizer.getLineNumber())); } if( readRow() ) { return columns.toArray(new String[columns.size()]); } return null; }