public interface ICsvListReader extends ICsvReader
Modifier and Type | Method and Description |
---|---|
List<Object> |
executeProcessors(CellProcessor... processors)
Executes the supplied cell processors on the last row of CSV that was read.
|
List<String> |
read()
Reads a row of a CSV file and returns a List of Strings containing each column.
|
List<Object> |
read(CellProcessor... processors)
Reads a row of a CSV file and returns a List of Objects containing each column.
|
get, getHeader, getLineNumber, getRowNumber, getUntokenizedRow, length
List<String> read() throws IOException
read(CellProcessor...)
because your CSV file has a variable number of columns, then
you can call the executeProcessors(CellProcessor...)
method after calling read()
to execute the
cell processors manually (after determining the number of columns read in and which cell processors to use).IOException
- if an I/O error occurredSuperCsvException
- if there was a general exception while reading/processingList<Object> read(CellProcessor... processors) throws IOException
processors
- an array of CellProcessors used to further process data before it is added to the List (each element
in the processors array corresponds with a CSV column - the number of processors should match the
number of columns). A null entry indicates no further processing is required (the unprocessed
String value will be added to the List).IOException
- if an I/O error occurredNullPointerException
- if processors is nullSuperCsvConstraintViolationException
- if a CellProcessor constraint failedSuperCsvException
- if there was a general exception while reading/processingList<Object> executeProcessors(CellProcessor... processors)
read()
instead of
read(CellProcessor...)
.processors
- an array of CellProcessors used to further process the last row of CSV data that was read (each
element in the processors array corresponds with a CSV column - the number of processors should match
the number of columns). A null entry indicates no further processing is required (the
unprocessed String value will be added to the List).NullPointerException
- if processors is nullSuperCsvConstraintViolationException
- if a CellProcessor constraint failedSuperCsvException
- if the wrong number of processors are supplied, or CellProcessor execution failedCopyright © 2007–2015 Super CSV. All rights reserved.