public class CSVWriter extends FormatWriter<CSVHeader>
appendFile
Constructor and Description |
---|
CSVWriter(java.io.File csvFile,
boolean append)
CSVWriter constructor using the default splitter ";".
|
CSVWriter(java.io.File csvFile,
boolean append,
java.lang.String token) |
Modifier and Type | Method and Description |
---|---|
void |
addRecord(java.lang.Object[] record)
This method writes a record in the output file.
|
void |
close() |
FormatField |
convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
This method generates the appropriate FormatField given a GExportFieldDetails instance.
|
protected java.io.BufferedReader |
openStream() |
void |
setFields(java.util.List<FormatField> fields)
This method sets the fields in the header.
|
createFormatWriter, getFilename, getHeader, setFields, setFormatHeader, validateRecord
public CSVWriter(java.io.File csvFile, boolean append, java.lang.String token) throws java.io.IOException
java.io.IOException
public CSVWriter(java.io.File csvFile, boolean append) throws java.io.IOException
csvFile
- append
- java.io.IOException
public void addRecord(java.lang.Object[] record) throws java.io.IOException
FormatWriter
addRecord
in class FormatWriter<CSVHeader>
record
- an Array of object to be written in the output filejava.io.IOException
public void setFields(java.util.List<FormatField> fields) throws java.io.IOException
FormatWriter
setFields
in class FormatWriter<CSVHeader>
fields
- a Vector of FormatField instancesjava.io.IOException
public void close()
public FormatField convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
FormatWriter
convertGExportFieldDetailsToFormatField
in class FormatWriter<CSVHeader>
details
- a GExportFieldDetails objectprotected java.io.BufferedReader openStream() throws java.io.IOException
java.io.IOException