public class CsvWriter extends Object implements Closeable
| Constructor and Description |
|---|
CsvWriter(OutputStream out)
Construct CsvWriter from an OutputStream.
|
CsvWriter(OutputStream out,
char separator,
char quote)
Construct CsvWriter from an OutputStream.
|
CsvWriter(Writer out)
Construct CsvWriter from a Writer.
|
CsvWriter(Writer out,
char separator,
char quote)
Construct CsvWriter from a Writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
endRecord()
Terminate current record.
|
void |
startRecord()
Start a new record.
|
void |
writeValue(String value)
Write a single field to the current record.
|
public CsvWriter(Writer out, char separator, char quote)
out - the Writerseparator - the CSV separatorquote - the CSV quoting characterpublic CsvWriter(OutputStream out, char separator, char quote)
out - the OutputStreamseparator - the CSV separatorquote - the CSV quoting characterpublic CsvWriter(OutputStream out)
Use comma as separator and double quotes as quoting characters.
out - the OutputStreampublic CsvWriter(Writer out)
Use comma as separator and double quotes as quoting characters.
out - the Writerpublic void startRecord()
public void endRecord()
public void writeValue(String value)
value - the field valuepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2014–2015 Tomas Teubner. All rights reserved.