File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
metafacture-io/src/main/java/org/metafacture/io Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ public void closeStream() {
139139 * effective the next time a new output file is opened.
140140 *
141141 * @param appendIfFileExists true if new data should be appended,
142- * false to overwrite the existing file.
142+ * false to overwrite the existing file
143143 */
144144 public void setAppendIfFileExists (final boolean appendIfFileExists ) {
145145 this .appendIfFileExists = appendIfFileExists ;
Original file line number Diff line number Diff line change @@ -128,6 +128,20 @@ public void setSeparator(final String separator) {
128128 objectWriter .setSeparator (separator );
129129 }
130130
131+ /**
132+ * Controls whether to open files in append mode if they exist.
133+ *
134+ * @see ObjectFileWriter#setAppendIfFileExists
135+ *
136+ * @param appendIfFileExists true if new data should be appended,
137+ * false to overwrite the existing file
138+ */
139+ public void setAppendIfFileExists (final boolean appendIfFileExists ) {
140+ if (objectWriter instanceof ObjectFileWriter ) {
141+ ((ObjectFileWriter ) objectWriter ).setAppendIfFileExists (appendIfFileExists );
142+ }
143+ }
144+
131145 @ Override
132146 public void process (final T obj ) {
133147 objectWriter .process (obj );
You can’t perform that action at this time.
0 commit comments