| 
 | BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.beanio.internal.parser.BeanReaderImpl
public class BeanReaderImpl
A BeanReader implementation.
| Constructor Summary | |
|---|---|
| BeanReaderImpl(UnmarshallingContext context,
               Selector layout)Constructs a new BeanReaderImpl. | |
| Method Summary | |
|---|---|
|  void | close()Closes the underlying input stream. | 
|  int | getLineNumber()Returns the starting line number of the first record for the most recent bean object read from this reader, or -1 when the end of the stream is reached. | 
|  RecordContext | getRecordContext(int index)Returns record information for the most recent bean object read from this reader. | 
|  int | getRecordCount()Returns the number of records read from the underlying input stream for the most recent bean object read from this reader. | 
|  String | getRecordName()Returns the record or group name of the most recent bean object read from this reader, or null if the end of the stream was reached. | 
|  Object | read()Reads a single bean from the input stream. | 
|  void | setErrorHandler(BeanReaderErrorHandler errorHandler)Sets the error handler to handle exceptions thrown by BeanReader.read(). | 
|  void | setIgnoreUnidentifiedRecords(boolean ignoreUnidentifiedRecords)Sets whether to ignore unidentified records. | 
|  int | skip(int count)Skips ahead in the input stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public BeanReaderImpl(UnmarshallingContext context,
                      Selector layout)
context - the UnmarshallingContextlayout - the root component of the parser tree| Method Detail | 
|---|
public Object read()
BeanReader
read in interface BeanReader
public int skip(int count)
         throws BeanReaderIOException,
                MalformedRecordException,
                UnidentifiedRecordException,
                UnexpectedRecordException
BeanReader
skip in interface BeanReadercount - the number of bean objects to skip over that would have been returned
   by calling BeanReader.read()
BeanReaderIOException - if the underlying input stream throws an
   IOException or this reader was closed
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 sequence
public void close()
           throws BeanReaderIOException
BeanReader
close in interface BeanReaderBeanReaderIOException - if the underlying input stream throws an
   IOException or this reader was already closedpublic String getRecordName()
BeanReader
getRecordName in interface BeanReaderpublic int getLineNumber()
BeanReader
getLineNumber in interface BeanReaderpublic int getRecordCount()
BeanReader
getRecordCount in interface BeanReaderpublic RecordContext getRecordContext(int index)
BeanReaderBeanReader.getRecordCount() can be used
 to determine how many records were read from the stream.
getRecordContext in interface BeanReaderindex - the index of the record, starting at 0
RecordContextBeanReader.getRecordCount()public void setErrorHandler(BeanReaderErrorHandler errorHandler)
BeanReaderBeanReader.read().
setErrorHandler in interface BeanReadererrorHandler - the BeanReaderErrorHandlerpublic void setIgnoreUnidentifiedRecords(boolean ignoreUnidentifiedRecords)
ignoreUnidentifiedRecords - true to ignore unidentified records, false otherwise| 
 | BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||