public class FixedLengthUnmarshallingContext extends UnmarshallingContext
UnmarshallingContext
implementation for a fixed length formatted stream.MARSHALLING, UNMARSHALLING
Constructor and Description |
---|
FixedLengthUnmarshallingContext()
Constructs a new FixedLengthUnmarshallingContext.
|
Modifier and Type | Method and Description |
---|---|
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
|
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
clear, createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, popIteration, pushIteration, setLocal
public FixedLengthUnmarshallingContext()
public void setRecordValue(Object value)
UnmarshallingContext
setRecordValue
in class UnmarshallingContext
value
- the record value read by a record readerRecordReader
public int getRecordLength()
public String getFieldText(String name, int position, int length, int until)
name
- the field nameposition
- the position of the field in the recordlength
- the field length, or -1 if the field is at the end of the
record and unboundeduntil
- 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