Class FixedLengthMarshallingContext
- java.lang.Object
-
- org.beanio.internal.parser.ParsingContext
-
- org.beanio.internal.parser.MarshallingContext
-
- org.beanio.internal.parser.format.fixedlength.FixedLengthMarshallingContext
-
public class FixedLengthMarshallingContext extends MarshallingContext
AMarshallingContext
for a fixed length formatted stream.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.beanio.internal.parser.ParsingContext
MARSHALLING, UNMARSHALLING
-
-
Constructor Summary
Constructors Constructor Description FixedLengthMarshallingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear is invoked after each bean object (record or group) is marshalled.java.lang.Object
getRecordObject()
Returns the record object to pass to theRecordWriter
whenMarshallingContext.writeRecord()
is called.TextLengthCounter
getTextLengthCounter()
void
setFieldText(int position, java.lang.String text, boolean commit)
Inserts field text into the record being marshalled.-
Methods inherited from class org.beanio.internal.parser.MarshallingContext
getBean, getComponentName, getMode, getRecordWriter, setBean, setComponentName, setRecordWriter, toArray, toDocument, toList, writeRecord
-
Methods inherited from class org.beanio.internal.parser.ParsingContext
createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, popIteration, pushIteration, setLocal
-
-
-
-
Method Detail
-
clear
public void clear()
Description copied from class:MarshallingContext
Clear is invoked after each bean object (record or group) is marshalled.- Overrides:
clear
in classMarshallingContext
-
setFieldText
public void setFieldText(int position, java.lang.String text, boolean commit)
Inserts field text into the record being marshalled.- Parameters:
position
- the position of the field in the recordtext
- the field text to insertcommit
- true to commit the current field length, or false if the field is optional and should not extend the record length unless a subsequent field is appended to the record
-
getTextLengthCounter
public TextLengthCounter getTextLengthCounter()
- Overrides:
getTextLengthCounter
in classMarshallingContext
-
getRecordObject
public java.lang.Object getRecordObject()
Description copied from class:MarshallingContext
Returns the record object to pass to theRecordWriter
whenMarshallingContext.writeRecord()
is called.- Specified by:
getRecordObject
in classMarshallingContext
- Returns:
- the record object
-
-