public class CsvListReader extends AbstractCsvReader implements ICsvListReader
Constructor and Description |
---|
CsvListReader(ITokenizer tokenizer,
CsvPreference preferences)
Constructs a new CsvListReader with the supplied (custom) Tokenizer and CSV preferences.
|
CsvListReader(java.io.Reader reader,
CsvPreference preferences)
Constructs a new CsvListReader with the supplied Reader and CSV preferences.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
read()
Reads a row of a CSV file and returns a List of Strings containing each column.
|
java.util.List<java.lang.Object> |
read(CellProcessor... processors)
Reads a row of a CSV file and returns a List of Objects containing each column.
|
close, get, getColumns, getHeader, getLineNumber, getPreferences, getRowNumber, getUntokenizedRow, length, readRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getHeader, getLineNumber, getRowNumber, getUntokenizedRow, length
public CsvListReader(java.io.Reader reader, CsvPreference preferences)
reader
- the readerpreferences
- the CSV preferencesjava.lang.NullPointerException
- if reader or preferences are nullpublic CsvListReader(ITokenizer tokenizer, CsvPreference preferences)
tokenizer
- the tokenizerpreferences
- the CSV preferencesjava.lang.NullPointerException
- if tokenizer or preferences are nullpublic java.util.List<java.lang.String> read() throws java.io.IOException
read
in interface ICsvListReader
java.io.IOException
- if an I/O error occurredpublic java.util.List<java.lang.Object> read(CellProcessor... processors) throws java.io.IOException
read
in interface ICsvListReader
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).java.io.IOException
- if an I/O error occurredCopyright © 2007-2012 Super CSV. All Rights Reserved.