|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface must be implemented by any class wishing to handle incoming records from a RecordReader class.
Method Summary | |
void |
end()
this method is called by the record reader after the last record has been read, when the end of the stream is reached. |
void |
error(int recordNumber,
String errorMsg,
String[] rawData)
this method is called by the record reader when it is unable to read a record into a record object. |
boolean |
newRecord(int recordNumber,
RecordData newRecord,
String[] rawData)
this method is called by the reader each time a record is successfully read and loaded into an RecordData object. |
void |
start()
this method is called by the record reader before reading the first record. |
Method Detail |
public void start()
public boolean newRecord(int recordNumber, RecordData newRecord, String[] rawData) throws RecordDataInputException
RecordData
object. If the raw data cannot be
converted to a record object, the RecordReader will add the record to an edit
(reject) file with an appriate message about the cause. If the record is created
successfully, but the handler throws an RecordDataInputException, the record is added to
the edit stream, along with the information provided in the exception.
recordNumber
- sequential number assigned to each record, whether it failed
or succeeded, starting at 1 for the first record in the stream.newRecord
- record object containg data values read for this record.rawData
- text data from input file used to create this record.
RecordDataInputException
- if record handling failed.public void error(int recordNumber, String errorMsg, String[] rawData)
recordNumber
- sequential number assigned to each record, whether it failed
or succeeded, starting at 1 for the first record in the stream.errorMsg
- descriprtion of the error that occured.rawData
- text data from the input stream which failed to produce a record.public void end()
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |