org.beanio.internal.parser.format.fixedlength
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
A MarshallingContext
for a fixed length formatted stream.
- Since:
- 2.0
- Author:
- Kevin Seim
Methods inherited from class org.beanio.internal.parser.MarshallingContext |
getBean, getComponentName, getMode, getRecordWriter, setBean, setComponentName, setRecordWriter, toArray, toDocument, toList, writeRecord |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FixedLengthMarshallingContext
public FixedLengthMarshallingContext()
- Constructs a new FixedLengthMarshallingContext.
clear
public void clear()
- Description copied from class:
MarshallingContext
- Clear is invoked after each record is marshalled.
- Overrides:
clear
in class MarshallingContext
setFieldText
public void setFieldText(int position,
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
getRecordObject
public Object getRecordObject()
- Description copied from class:
MarshallingContext
- Returns the record object to pass to the
RecordWriter
when
MarshallingContext.writeRecord()
is called.
- Specified by:
getRecordObject
in class MarshallingContext
- Returns:
- the record object
Copyright © 2010-2013 Kevin Seim