From: Mathieu Baudier Date: Wed, 11 Nov 2020 17:26:18 +0000 (+0100) Subject: Add constructor with writer. X-Git-Tag: argeo-commons-2.1.89~25 X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=commitdiff_plain;h=b8825be341191996b9c92d5401eb6962bc48e1b1 Add constructor with writer. --- diff --git a/org.argeo.core/src/org/argeo/util/CsvWriter.java b/org.argeo.core/src/org/argeo/util/CsvWriter.java index 41ea65dd4..a4fe15bfa 100644 --- a/org.argeo.core/src/org/argeo/util/CsvWriter.java +++ b/org.argeo.core/src/org/argeo/util/CsvWriter.java @@ -56,6 +56,15 @@ public class CsvWriter { this.out = new OutputStreamWriter(out, charset); } + /** + * Creates a CSV writer. + * + * @param out the stream to write to. Caller is responsible for closing it. + */ + public CsvWriter(Writer writer) { + this.out = writer; + } + /** * Write a CSV line. Also used to write a header if needed (this is transparent * for the CSV writer): simply call it first, before writing the lines.