зеркало из
https://github.com/iharh/notes.git
synced 2025-11-01 14:16:09 +02:00
20 строки
614 B
Plaintext
20 строки
614 B
Plaintext
https://opencsv.sourceforge.net/
|
|
|
|
https://mvnrepository.com/artifact/com.opencsv/opencsv
|
|
|
|
2022
|
|
https://www.baeldung.com/opencsv
|
|
|
|
public String writeLineByLine(List<String[]> lines, Path path) throws Exception {
|
|
try (CSVWriter writer = new CSVWriter(new FileWriter(path.toString()))) {
|
|
for (String[] line : lines) {
|
|
writer.writeNext(array);
|
|
}
|
|
return Helpers.readFile(path);
|
|
}
|
|
|
|
public String writeAllLines(List<String[]> lines, Path path) throws Exception {
|
|
try (CSVWriter writer = new CSVWriter(new FileWriter(path.toString()))) {
|
|
writer.writeAll(stringArray);
|
|
}
|