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() {
139
139
* effective the next time a new output file is opened.
140
140
*
141
141
* @param appendIfFileExists true if new data should be appended,
142
- * false to overwrite the existing file.
142
+ * false to overwrite the existing file
143
143
*/
144
144
public void setAppendIfFileExists (final boolean appendIfFileExists ) {
145
145
this .appendIfFileExists = appendIfFileExists ;
Original file line number Diff line number Diff line change @@ -128,6 +128,20 @@ public void setSeparator(final String separator) {
128
128
objectWriter .setSeparator (separator );
129
129
}
130
130
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
+
131
145
@ Override
132
146
public void process (final T obj ) {
133
147
objectWriter .process (obj );
You can’t perform that action at this time.
0 commit comments