|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.internal.parser.ParsingContext org.beanio.internal.parser.MarshallingContext org.beanio.internal.parser.format.delimited.DelimitedMarshallingContext
public class DelimitedMarshallingContext
A MarshallingContext
for delimited records.
Field Summary |
---|
Fields inherited from class org.beanio.internal.parser.ParsingContext |
---|
MARSHALLING, UNMARSHALLING |
Constructor Summary | |
---|---|
DelimitedMarshallingContext()
Constructs a new DelimitedMarshallingContext. |
Method Summary | |
---|---|
void |
clear()
Clear is invoked after each record is marshalled. |
Object |
getRecordObject()
Returns the record object to pass to the RecordWriter when
MarshallingContext.writeRecord() is called. |
void |
setField(int position,
String fieldText,
boolean commit)
Puts the field text in the record. |
String[] |
toArray(Object record)
Converts a record object to a String[]. |
List<String> |
toList(Object record)
Converts a record object to a List . |
Methods inherited from class org.beanio.internal.parser.MarshallingContext |
---|
getBean, getComponentName, getMode, getRecordWriter, setBean, setComponentName, setRecordWriter, toDocument, writeRecord |
Methods inherited from class org.beanio.internal.parser.ParsingContext |
---|
createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, popIteration, pushIteration, setLocal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelimitedMarshallingContext()
Method Detail |
---|
public void clear()
MarshallingContext
clear
in class MarshallingContext
public void setField(int position, String fieldText, boolean commit)
position
- the position of the field in the record.fieldText
- the field textcommit
- true to commit the current record, or false
if the field is optional and should not extend the record
unless a subsequent field is later appended to the recordpublic Object getRecordObject()
MarshallingContext
RecordWriter
when
MarshallingContext.writeRecord()
is called.
getRecordObject
in class MarshallingContext
public String[] toArray(Object record)
MarshallingContext
toArray
in class MarshallingContext
record
- the record object to convert
public List<String> toList(Object record)
MarshallingContext
List
.
toList
in class MarshallingContext
record
- the record object to convert
List
result, or null if not supported
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |