public Map<String, Object> read(final String[] nameMapping, final CellProcessor[] processors) throws IOException {
if( nameMapping == null ) {
throw new NullPointerException("nameMapping should not be null");
} else if( processors == null ) {
throw new NullPointerException("processors should not be null");
}
if( readRow() ) {
final List<Object> processedColumns = executeProcessors(new ArrayList<Object>(getColumns().size()),
processors);
final Map<String, Object> destination = new HashMap<String, Object>(processedColumns.size());
Util.filterListToMap((Map<String, Object>) destination, nameMapping, (List<Object>) processedColumns);
return destination;
}
return null;
}
}