public class CsvWriter extends Object
| Constructor and Description |
|---|
CsvWriter(Writer writer)
Constructs a new CsvWriter with the given
writer
|
CsvWriter(Writer writer,
char delim)
Constructs a new CsvWriter with the given
writer and the given char as delimiter
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close writer
|
void |
write(Date date)
writes a date with default the format "dd.MM.yyy"
|
void |
write(Date date,
DateFormat dateFormatter)
write method, which writes date object
|
void |
write(double value)
write method, which writes an double value
|
void |
write(int integer)
write method, which writes an integer value
|
void |
write(String string)
write method, which writes a string
|
void |
writeNewLine()
makes a new line with carriage return (code xx) plus line feed (code yy) ('\r\n')
|
void |
writeNewLine(String newLine)
makes a new line with variable breakes
|
public CsvWriter(Writer writer)
writer - writer for the filepublic CsvWriter(Writer writer, char delim)
writer - writer for the filedelim - the delimiter charpublic void write(Date date) throws IOException
date - date objectIOExceptionpublic void write(Date date, DateFormat dateFormatter) throws IOException
date - date objectdateFormatter - format of date like "dd.MM.yyyy"IOExceptionpublic void write(int integer)
throws IOException
integer - valueIOExceptionpublic void write(double value)
throws IOException
value - IOExceptionpublic void write(String string) throws IOException
string - writes the specified string csv-encodedIOExceptionpublic void writeNewLine()
throws IOException
IOExceptionpublic void writeNewLine(String newLine) throws IOException
newLine - string as '\r','\n','\r\n'IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408