summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-11-21 16:06:17 -0600
committerInstrumental <jonathan.gathman@att.com>2018-11-21 16:06:24 -0600
commitf95fc5f7ae9cf1832eae2451be883477bbd08f16 (patch)
tree75beb85f559840a2019ce81257f4b9dc49d1e0ca /cadi
parente92832a4f8dbcc18dff57ff09232c5b75687742e (diff)
Batch upgrades for ONAP
Issue-ID: AAF-641 Change-Id: I7b5e8b97d8c6c484418c995b6e51507af78fc765 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java b/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java
index 4ae68310..c7fada74 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java
@@ -45,8 +45,8 @@ public class CSV {
csv = file;
}
- public CSV(String csvOfProperties) {
- csv = new File(csvOfProperties);
+ public CSV(String csvFilename) {
+ csv = new File(csvFilename);
}
@@ -126,13 +126,17 @@ public class CSV {
}
public Writer writer() throws FileNotFoundException {
- return new Writer();
+ return new Writer(false);
}
-
+
+ public Writer writer(boolean append) throws FileNotFoundException {
+ return new Writer(append);
+ }
+
public class Writer {
private PrintStream ps;
- private Writer() throws FileNotFoundException {
- ps = new PrintStream(new FileOutputStream(csv));
+ private Writer(final boolean append) throws FileNotFoundException {
+ ps = new PrintStream(new FileOutputStream(csv,append));
}
public void row(Object ... strings) {
if(strings.length>0) {
@@ -177,6 +181,10 @@ public class CSV {
public void close() {
ps.close();
}
+
+ public String toString() {
+ return csv.getAbsolutePath();
+ }
}
public void delete() {