projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add constructor with writer.
[lgpl/argeo-commons.git]
/
org.argeo.core
/
src
/
org
/
argeo
/
util
/
CsvWriter.java
diff --git
a/org.argeo.core/src/org/argeo/util/CsvWriter.java
b/org.argeo.core/src/org/argeo/util/CsvWriter.java
index 41ea65dd4903a88af162c640475160929d2c5210..a4fe15bfa74a503c8a56bfdd2f9ec1eff9018b5b 100644
(file)
--- 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);
}
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.
/**
* 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.