public class FlatFileRecordReader extends Object implements RecordReader
RecordReader implementation that read data from a flat file.| Constructor and Description |
|---|
FlatFileRecordReader(File input)
Constructs a flat file record reader.
|
FlatFileRecordReader(File input,
String charsetName)
Constructs a flat file record reader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getDataSourceName() |
Long |
getTotalRecords() |
boolean |
hasNextRecord() |
void |
open() |
StringRecord |
readNextRecord() |
public FlatFileRecordReader(File input) throws FileNotFoundException
input - the input fileFileNotFoundException - thrown if the file does not existpublic FlatFileRecordReader(File input, String charsetName) throws FileNotFoundException
input - the input filecharsetName - the encoding to use to read the fileFileNotFoundException - thrown if the file does not existpublic StringRecord readNextRecord()
readNextRecord in interface RecordReaderpublic Long getTotalRecords()
getTotalRecords in interface RecordReaderpublic String getDataSourceName()
getDataSourceName in interface RecordReaderpublic void open()
throws Exception
open in interface RecordReaderExceptionpublic boolean hasNextRecord()
hasNextRecord in interface RecordReaderpublic void close()
close in interface RecordReaderCopyright © 2015. All Rights Reserved.