public class StringRecordReader extends Object implements RecordReader
RecordReader that reads data from a String.
This reader produces StringRecord instances.| Constructor and Description |
|---|
StringRecordReader(String dataSource)
Create a
StringRecordReader. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the reader.
|
String |
getDataSourceName()
This method returns a human readable data source name to be shown in the batch report.
|
Long |
getTotalRecords()
Get the total record number in the data source.
|
boolean |
hasNextRecord()
Check if the reader has a next record.
|
void |
open()
Open the reader.
|
StringRecord |
readNextRecord()
Read next record from the data source.
|
public StringRecordReader(String dataSource)
StringRecordReader.dataSource - The String data sourcepublic void open()
RecordReaderopen in interface RecordReaderpublic boolean hasNextRecord()
RecordReaderhasNextRecord in interface RecordReaderpublic StringRecord readNextRecord()
RecordReaderreadNextRecord in interface RecordReaderpublic Long getTotalRecords()
RecordReadergetTotalRecords in interface RecordReaderpublic String getDataSourceName()
RecordReadergetDataSourceName in interface RecordReaderpublic void close()
RecordReaderclose in interface RecordReaderCopyright © 2015. All Rights Reserved.