public class CSVWriter extends Object
Modifier and Type | Method and Description |
---|---|
void |
flush()
Ensures all the data is written to the underlying writer.
|
static NumberFormat |
getDecimalFormater(Locale locale)
Returns a formatter to use to output decimal number.
|
char |
getQuote() |
char |
getSeparator() |
boolean |
isAlwaysQuoteCells() |
void |
newLine() |
void |
setAlwaysQuoteCells(boolean alwaysQuoteCells) |
void |
setQuote(char quote) |
void |
setSeparator(char separator) |
void |
writeCell(String cell) |
public CSVWriter(Writer writer)
writer
- The writer where to write the datapublic void writeCell(String cell) throws IOException
IOException
public void newLine() throws IOException
IOException
public void flush() throws IOException
IOException
- If something goes wrongpublic char getSeparator()
public void setSeparator(char separator)
separator
- the separator to setpublic char getQuote()
public void setQuote(char quote)
quote
- the quote to setpublic boolean isAlwaysQuoteCells()
public void setAlwaysQuoteCells(boolean alwaysQuoteCells)
alwaysQuoteCells
- the alwaysQuoteCells to setpublic static NumberFormat getDecimalFormater(Locale locale)
locale
- The locale.Copyright © 2022. All rights reserved.