org.beanio.internal.parser.format.fixedlength
Class FixedLengthUnmarshallingContext
java.lang.Object
   org.beanio.internal.parser.ParsingContext
org.beanio.internal.parser.ParsingContext
       org.beanio.internal.parser.UnmarshallingContext
org.beanio.internal.parser.UnmarshallingContext
           org.beanio.internal.parser.format.fixedlength.FixedLengthUnmarshallingContext
org.beanio.internal.parser.format.fixedlength.FixedLengthUnmarshallingContext
- public class FixedLengthUnmarshallingContext 
- extends UnmarshallingContext
The UnmarshallingContext implementation for a fixed length formatted stream.
- Since:
- 2.0
- Author:
- Kevin Seim
 
 
 
| Method Summary | 
|  String | getFieldText(String name,
             int position,
             int length,
             int until)Returns the field text at the given position in the record.
 | 
|  int | getRecordLength()Returns the length of the record being unmarshalled.
 | 
|  void | setRecordValue(Object value)Sets the value of the record returned from the RecordReader
 | 
 
| Methods inherited from class org.beanio.internal.parser.UnmarshallingContext | 
| addFieldError, addRecordError, addRecordError, getLineNumber, getLocale, getMessageFactory, getMode, getRecordContext, getRecordCount, getRecordReader, hasFieldErrors, hasRecordErrors, isEOF, newMalformedRecordException, newUnsatisfiedGroupException, newUnsatisfiedRecordException, nextRecord, prepare, recordCompleted, recordException, recordSkipped, recordStarted, recordUnexpectedException, recordUnidentifiedException, setFieldText, setLocale, setMessageFactory, setRecordReader, toRecordValue, toRecordValue, toRecordValue, validate | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
FixedLengthUnmarshallingContext
public FixedLengthUnmarshallingContext()
- Constructs a new FixedLengthUnmarshallingContext.
 
setRecordValue
public void setRecordValue(Object value)
- Description copied from class: UnmarshallingContext
- Sets the value of the record returned from the RecordReader
 
- 
- Specified by:
- setRecordValuein class- UnmarshallingContext
 
- 
- Parameters:
- value- the record value read by a record reader
- See Also:
- RecordReader
 
getRecordLength
public int getRecordLength()
- Returns the length of the record being unmarshalled.
 
- 
- Returns:
- the record length
 
getFieldText
public String getFieldText(String name,
                           int position,
                           int length,
                           int until)
- Returns the field text at the given position in the record.
 
- 
- Parameters:
- name- the field name
- position- the position of the field in the record
- length- the field length, or -1 if the field is at the end of the
   record and unbounded
- until- the maximum position of the field as an offset
   of the field count, for example -2 to indicate the any position
   except the last two fields in the record
- Returns:
- the field text, or null if the record length is less than
   the position of the field
 
Copyright © 2010-2013 Kevin Seim