public class CsvExporterImpl extends Object implements ExportUtils.CsvExporter
Constructor and Description |
---|
CsvExporterImpl(File aFile)
Creates a new
CsvExporterImpl instance. |
CsvExporterImpl(File aFile,
char aDelimiter)
Creates a new
CsvExporterImpl instance. |
Modifier and Type | Method and Description |
---|---|
void |
addRow(Object... aValues)
Adds a new row with cell values to the CSV output.
|
void |
close()
Closes this exporter.
|
void |
setHeaders(String... aHeaders)
Sets the headers of the CSV file.
|
public CsvExporterImpl(File aFile) throws IOException
CsvExporterImpl
instance.aFile
- the file to export to, cannot be null
.IOException
- in case of I/O exceptions.public CsvExporterImpl(File aFile, char aDelimiter) throws IOException
CsvExporterImpl
instance.aFile
- the file to export to, cannot be null
;aDelimiter
- the CSV delimiter to use.IOException
- in case of I/O exceptions.public void addRow(Object... aValues) throws IOException
addRow
in interface ExportUtils.CsvExporter
aValues
- the cell values to write in this row.IOException
- in case of I/O problems.public void close() throws IOException
close
in interface ExportUtils.CsvExporter
IOException
- in case of I/O problems.public void setHeaders(String... aHeaders) throws IOException
setHeaders
in interface ExportUtils.CsvExporter
aHeaders
- the array of header names.IOException
- in case of I/O problems.Copyright © 2015 L'Xtreme IT consultancy. All rights reserved.