public abstract class AbstractRecordFileReader<T extends Model<?>> extends Object implements RecordReader<T>
RecordReader, for reading input files. Handles the
file object opening and closing in the doBefore and doAfter methods, respectively.| Constructor and Description |
|---|
AbstractRecordFileReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the target file, if a reader exists.
|
void |
doAfter()
Calls the close method on the reader.
|
void |
doBefore(String input)
Closes any open readers and opens the new target file.
|
protected BufferedReader |
getReader() |
void |
open(String inputFilePath)
Opens the target file and creates a
BufferedReader, which can be referenced via its
getter method. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadRecordpublic void doBefore(String input) throws DataImportException
doBefore in interface RecordReader<T extends Model<?>>input - DataImportExceptionpublic void doAfter()
doAfter in interface RecordReader<T extends Model<?>>public void open(String inputFilePath) throws DataImportException
BufferedReader, which can be referenced via its
getter method.inputFilePath - DataImportExceptionpublic void close()
protected BufferedReader getReader()
Copyright © 2016. All rights reserved.