|
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BeanReader
Interface for readers capable of reading bean objects from an input stream.
A BeanReader is created using a StreamFactory and a mapping file.
StreamFactory| Method Summary | |
|---|---|
void |
close()
Closes the underlying input stream. |
int |
getLineNumber()
The beginning line number of the last record read. |
String |
getRecordName()
Returns the name of the last record read. |
Object |
read()
Reads a single bean from the input stream. |
void |
setErrorHandler(BeanReaderErrorHandler errorHandler)
Sets the error handler to delegate bean reader exceptions to. |
int |
skip(int count)
Skips ahead in the input stream. |
| Method Detail |
|---|
Object read()
throws BeanReaderIOException,
MalformedRecordException,
UnidentifiedRecordException,
UnexpectedRecordException,
InvalidRecordException
BeanReaderIOException - if an IOException or other fatal error is caught
MalformedRecordException - if the underlying input stream is malformed
and the record could not be accurately read
UnidentifiedRecordException - if the record type could not be identified
UnexpectedRecordException - if the record type is out of sequence
InvalidRecordException - if the record was identified and failed record
or field level validations (including field type conversion errors)
int skip(int count)
throws BeanReaderIOException,
MalformedRecordException,
UnidentifiedRecordException,
UnexpectedRecordException
count - the number of bean objects to skip over that would have been returned
by calling read()
BeanReaderIOException - if an IOException or other fatal error is caught
MalformedRecordException - if the underlying input stream is malformed
and a record could not be accurately skipped
UnidentifiedRecordException - if a record could not be identified
UnexpectedRecordException - if a record is out of sequenceString getRecordName()
int getLineNumber()
void close()
throws BeanReaderIOException
BeanReaderIOException - if an IOException is thrown when closing the streamvoid setErrorHandler(BeanReaderErrorHandler errorHandler)
errorHandler - the error handler to delegate exceptions to
|
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||