public class CsvWriter extends FlatDataWriter
headersWritten, linesWritten| Constructor and Description |
|---|
CsvWriter(OutputStream out)
Constructs the writer using the specified
OutputStream to write the CSV file. |
CsvWriter(OutputStream out,
String charsetName)
Constructs the writer using the specified
OutputStream and the specified charset encoding to write the CSV file. |
CsvWriter(OutputStream out,
String charsetName,
char separator,
char quotechar) |
CsvWriter(Writer writer) |
CsvWriter(Writer writer,
char separator,
char quoteChar) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
protected void |
writeNextInternal(Object[] values) |
getLinesWritten, isHeadersWritten, writeAll, writeHeaders, writeHeaders, writeHeaders, writeNext, writeNext, writeNextgetDateFormat, getFieldNames, getFields, setDateFormat, setDateFormat, setFieldNames, setFields, setFieldspublic CsvWriter(Writer writer)
public CsvWriter(OutputStream out) throws UnsupportedEncodingException
OutputStream to write the CSV file.
The default charset encoding will be UTF_8UnsupportedEncodingExceptionpublic CsvWriter(OutputStream out, String charsetName) throws UnsupportedEncodingException
OutputStream and the specified charset encoding to write the CSV file.UnsupportedEncodingExceptionpublic CsvWriter(OutputStream out, String charsetName, char separator, char quotechar) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic CsvWriter(Writer writer, char separator, char quoteChar)
protected void writeNextInternal(Object[] values)
writeNextInternal in class FlatDataWriterpublic void flush()
throws IOException
flush in class FlatDataWriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FlatDataWriterIOExceptionCopyright © 2021 Open Foris. All rights reserved.