public class DelimitedUnmarshallingContext extends UnmarshallingContext
UnmarshallingContext
for a delimited record.
The record value type for a delimited record is a String array.
MARSHALLING, UNMARSHALLING
Constructor and Description |
---|
DelimitedUnmarshallingContext()
Constructs a new DelimitedUnmarshallingContext.
|
Modifier and Type | Method and Description |
---|---|
int |
getFieldCount()
Returns the number of fields read from the input stream.
|
String |
getFieldText(String fieldName,
int position,
int until)
Returns the field text at the given position in the record.
|
void |
setRecordValue(Object value)
Sets the value of the record returned from the RecordReader
|
Object |
toRecordValue(List<String> list)
Converts a
List to a record value. |
Object |
toRecordValue(String[] array)
Converts a String[] to a record value.
|
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, validate
clear, createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, popIteration, pushIteration, setLocal
public DelimitedUnmarshallingContext()
public void setRecordValue(Object value)
UnmarshallingContext
setRecordValue
in class UnmarshallingContext
value
- the record value read by a record readerRecordReader
public int getFieldCount()
public String getFieldText(String fieldName, int position, int until)
position
- the position of the field within the recorduntil
- 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 recordpublic Object toRecordValue(String[] array)
UnmarshallingContext
toRecordValue
in class UnmarshallingContext
array
- the String[] to convertpublic Object toRecordValue(List<String> list)
UnmarshallingContext
List
to a record value.toRecordValue
in class UnmarshallingContext
list
- the List to convert