Package de.espirit.common.util
Class CsvWriter
java.lang.Object
de.espirit.common.util.CsvWriter
Utility class to write CSV files.
- Since:
- 5.1.28
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
close writervoid
write
(double value) write method, which writes an double valuevoid
write
(int integer) write method, which writes an integer valuevoid
write method, which writes a stringvoid
writes a date with default the format "dd.MM.yyy"void
write
(Date date, DateFormat dateFormatter) write method, which writes date objectvoid
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
-
Constructor Details
-
CsvWriter
Constructs a new CsvWriter with the given writer- Parameters:
writer
- writer for the file- Since:
- 5.1.28
-
CsvWriter
Constructs a new CsvWriter with the given writer and the given char as delimiter- Parameters:
writer
- writer for the filedelim
- the delimiter char- Since:
- 5.1.28
-
-
Method Details
-
write
writes a date with default the format "dd.MM.yyy"- Parameters:
date
- date object- Throws:
IOException
- Since:
- 5.1.28
-
write
write method, which writes date object- Parameters:
date
- date objectdateFormatter
- format of date like "dd.MM.yyyy"- Throws:
IOException
- Since:
- 5.1.28
-
write
write method, which writes an integer value- Parameters:
integer
- value- Throws:
IOException
- Since:
- 5.1.28
-
write
write method, which writes an double value- Parameters:
value
-- Throws:
IOException
- Since:
- 5.1.28
-
write
write method, which writes a string- Parameters:
string
- writes the specified string csv-encoded- Throws:
IOException
- Since:
- 5.1.28
-
writeNewLine
makes a new line with carriage return (code xx) plus line feed (code yy) ('\r\n')- Throws:
IOException
- Since:
- 5.1.28
-
writeNewLine
makes a new line with variable breakes- Parameters:
newLine
- string as '\r','\n','\r\n'- Throws:
IOException
- Since:
- 5.1.28
-
close
close writer- Throws:
IOException
- Since:
- 5.1.28
-