|
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.format.flat.FlatFieldFormatSupport org.beanio.internal.parser.format.fixedlength.FixedLengthFieldFormat
public class FixedLengthFieldFormat
A FieldFormat
implementation for a field in a fixed length formatted stream.
Constructor Summary | |
---|---|
FixedLengthFieldFormat()
Constructs a new FixedLengthFieldFormat. |
Method Summary | |
---|---|
String |
extract(UnmarshallingContext context,
boolean reportErrors)
Extracts the field text from a record. |
String |
extractFieldText(UnmarshallingContext context,
boolean reporting)
|
int |
getSize()
Returns the size of the field. |
void |
insertFieldText(MarshallingContext context,
String fieldText,
boolean commit)
|
void |
setKeepPadding(boolean keepPadding)
Set to true to keep field padding during unmarshalling. |
Methods inherited from class org.beanio.internal.parser.format.flat.FlatFieldFormatSupport |
---|
getName, getPadding, getPosition, getUntil, insertField, insertValue, isLazy, isNillable, setLazy, setName, setPadding, setPosition, setUntil, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.beanio.internal.parser.FieldFormat |
---|
insertField, insertValue, isLazy, isNillable |
Constructor Detail |
---|
public FixedLengthFieldFormat()
Method Detail |
---|
public String extract(UnmarshallingContext context, boolean reportErrors)
FieldFormat
May return Value.INVALID
if the field is invalid, or Value.NIL
if the field is explicitly set to nil or null such as in an XML or JSON formatted
stream.
Implementations should also remove any field padding before returning the text.
extract
in interface FieldFormat
extract
in class FlatFieldFormatSupport
context
- the UnmarshallingContext
holding the record
public String extractFieldText(UnmarshallingContext context, boolean reporting)
extractFieldText
in class FlatFieldFormatSupport
public void insertFieldText(MarshallingContext context, String fieldText, boolean commit)
insertFieldText
in class FlatFieldFormatSupport
public int getSize()
FieldFormat
getSize
in interface FieldFormat
getSize
in class FlatFieldFormatSupport
public void setKeepPadding(boolean keepPadding)
keepPadding
- true to keep padding
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |