Last updated June 30, 2011 06:18, by Arne Burmeister
How should Diergo CSV be used?
The most simple way are the static methods of CommaSeparatedValues.
To parse CSV from a reader:
import static diergo.csv.CommaSeparatedValues.parse;
...
Reader csv = ...;
for (String[] row : parse(csv)) {
// do whatever you want with the values of the row.
}
csv,close();
To write CSV to a writer:
import static diergo.csv.CommaSeparatedValues.generate; ... Writer csv = ...; Iterable<String[]> rows = ...; generate(rows, ',', csv); csv,close();
For more information, have a look at the API. Diergo CSV is based on Diergo Utils.





