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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close writervoidwrite(double value) write method, which writes an double valuevoidwrite(int integer) write method, which writes an integer valuevoidwrite method, which writes a stringvoidwrites a date with default the format "dd.MM.yyy"voidwrite(Date date, DateFormat dateFormatter) write method, which writes date objectvoidmakes a new line with carriage return (code xx) plus line feed (code yy) ('\r\n')voidwriteNewLine(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
-