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(Object... args)
Calls the close method on the reader.
|
void |
doBefore(Object... args)
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(Object... args) throws DataImportException
doBefore in interface DataImportComponentargs - DataImportExceptionpublic void doAfter(Object... args)
doAfter in interface DataImportComponentargs - an array of objects of any type.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.