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 objectIOException
public void write(Date date, DateFormat dateFormatter) throws IOException
date
- date objectdateFormatter
- format of date like "dd.MM.yyyy"IOException
public void write(int integer) throws IOException
integer
- valueIOException
public void write(double value) throws IOException
value
- IOException
public void write(String string) throws IOException
string
- writes the specified string csv-encodedIOException
public void writeNewLine() throws IOException
IOException
public void writeNewLine(String newLine) throws IOException
newLine
- string as '\r','\n','\r\n'IOException
public void close() throws IOException
IOException
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408