public class CsvListWriter extends AbstractCsvWriter implements ICsvListWriter
Constructor and Description |
---|
CsvListWriter(java.io.Writer writer,
CsvPreference preference)
Constructs a new CsvListWriter with the supplied Writer and CSV preferences.
|
Modifier and Type | Method and Description |
---|---|
void |
write(java.util.List<?> columns)
Writes a List of Objects as columns of a CSV file.
|
void |
write(java.util.List<?> columns,
CellProcessor[] processors)
Writes a List of Objects as columns of a CSV file, performing any necessary processing beforehand.
|
void |
write(java.lang.Object... columns)
Writes a array of Objects as columns of a CSV file.
|
void |
write(java.lang.String... columns)
Writes an array of strings as columns of a CSV file.
|
close, escapeString, flush, getLineNumber, getRowNumber, incrementRowAndLineNo, writeComment, writeHeader, writeRow, writeRow, writeRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLineNumber, getRowNumber, writeComment, writeHeader
public CsvListWriter(java.io.Writer writer, CsvPreference preference)
writer
- the writerpreference
- the CSV preferencesjava.lang.NullPointerException
- if writer or preference are nullpublic void write(java.util.List<?> columns, CellProcessor[] processors) throws java.io.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).java.io.IOException
- If an I/O error occurspublic void write(java.util.List<?> columns) throws java.io.IOException
write
in interface ICsvListWriter
columns
- the columns to writejava.io.IOException
- If an I/O error occurspublic void write(java.lang.Object... columns) throws java.io.IOException
write
in interface ICsvListWriter
columns
- the columns to writejava.io.IOException
- If an I/O error occurspublic void write(java.lang.String... columns) throws java.io.IOException
write
in interface ICsvListWriter
columns
- the columns to writejava.io.IOException
- If an I/O error occursCopyright © 2007-2014 Super CSV. All Rights Reserved.