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 |
|---|---|
void |
close()
Flushes outstanding records to the output file and then closes the file and its writer object.
|
void |
doAfter()
Closes the open file writer.
|
void |
doBefore(String destination)
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(String destination) throws DataImportException
doBefore in interface RecordWriter<T extends Model<?>>destination - DataImportExceptionpublic void doAfter()
throws DataImportException
doAfter in interface RecordWriter<T extends Model<?>>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.