public abstract class AbstractRecordFileWriter<T extends Model<?>> extends Object implements RecordWriter<T>
RecordWriter, for writing records to temp files. Handles the
file object opening and closing in the doBefore and doAfter methods, respectively.| Constructor and Description |
|---|
AbstractRecordFileWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
cleanFilePath(String path) |
void |
close()
Flushes outstanding records to the output file and then closes the file and its writer object.
|
void |
doAfter(Object... args)
Closes the open file writer.
|
void |
doBefore(Object... args)
Opens a new output file for writing.
|
protected FileWriter |
getWriter() |
void |
open(String outputFilePath)
Creates or overwrites an output file, creates a
FileWriter for writing records to the file. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteRecordpublic void doBefore(Object... args) throws DataImportException
doBefore in interface DataImportComponentargs - DataImportExceptionpublic void doAfter(Object... args) throws DataImportException
doAfter in interface DataImportComponentargs - DataImportExceptionpublic void open(String outputFilePath) throws DataImportException
FileWriter for writing records to the file.outputFilePath - DataImportExceptionpublic void close()
protected FileWriter getWriter()
Copyright © 2016. All rights reserved.