public interface ICsvMapWriter extends ICsvWriter
Modifier and Type | Method and Description |
---|---|
void |
write(java.util.Map<java.lang.String,?> values,
java.lang.String... nameMapping)
Writes the values of the Map as columns of a CSV file, using the supplied name mapping to map values to the
appropriate columns.
|
void |
write(java.util.Map<java.lang.String,?> values,
java.lang.String[] nameMapping,
CellProcessor[] processors)
Writes the values of the Map as columns of a CSV file, using the supplied name mapping to map values to the
appropriate columns.
|
getLineNumber, getRowNumber, writeHeader
void write(java.util.Map<java.lang.String,?> values, java.lang.String... nameMapping) throws java.io.IOException
values
- the Map containing the values to writenameMapping
- an array of Strings linking the Map keys to their corresponding CSV columns (the array length should
match the number of columns). A null entry in the array indicates that the column should be
ignored (the column will be empty).java.io.IOException
- if an I/O error occurredjava.lang.NullPointerException
- if values or nameMapping are nullSuperCsvException
- if there was a general exception while writingvoid write(java.util.Map<java.lang.String,?> values, java.lang.String[] nameMapping, CellProcessor[] processors) throws java.io.IOException
values
- the Map containing the values to writenameMapping
- an array of Strings linking the Map keys to their corresponding CSV columns (the array length should
match the number of columns). A null entry in the array indicates that the column should be
ignored (the column will be empty).processors
- 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 occurredjava.lang.NullPointerException
- if values or nameMapping are nullSuperCsvConstraintViolationException
- if a CellProcessor constraint failedSuperCsvException
- if there was a general exception while writingCopyright © 2007-2012 Super CSV. All Rights Reserved.