Closeable
, Flushable
, AutoCloseable
, ICsvListWriter
, ICsvWriter
public class CsvListWriter extends AbstractCsvWriter implements ICsvListWriter
Constructor | Description |
---|---|
CsvListWriter(Writer writer,
CsvPreference preference) |
Constructs a new CsvListWriter with the supplied Writer and CSV preferences.
|
Modifier and Type | Method | Description |
---|---|---|
void |
write(Object... columns) |
Writes a array of Objects as columns of a CSV file.
|
void |
write(String... columns) |
Writes an array of strings as columns of a CSV file.
|
void |
write(List<?> columns) |
Writes a List of Objects as columns of a CSV file.
|
void |
write(List<?> columns,
CellProcessor[] processors) |
Writes a List of Objects as columns of a CSV file, performing any necessary processing beforehand.
|
close, flush, getLineNumber, getRowNumber, incrementRowAndLineNo, writeComment, writeHeader, writeRow, writeRow, writeRow
getLineNumber, getRowNumber, writeComment, writeHeader
public CsvListWriter(Writer writer, CsvPreference preference)
writer
- the writerpreference
- the CSV preferencesNullPointerException
- if writer or preference are nullpublic void write(List<?> columns, CellProcessor[] processors) throws IOException
write
in interface ICsvListWriter
columns
- the columns to writeprocessors
- an array of CellProcessors used to further process data before it is written (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 value returned by
toString() will be written as the column value).IOException
- If an I/O error occurspublic void write(List<?> columns) throws IOException
write
in interface ICsvListWriter
columns
- the columns to writeIOException
- If an I/O error occurspublic void write(Object... columns) throws IOException
write
in interface ICsvListWriter
columns
- the columns to writeIOException
- If an I/O error occurspublic void write(String... columns) throws IOException
write
in interface ICsvListWriter
columns
- the columns to writeIOException
- If an I/O error occursCopyright © 2007–2018 Super CSV. All rights reserved.