public class FixedLengthFieldFormat extends FlatFieldFormatSupport implements FieldFormat
FieldFormat implementation for a field in a fixed length formatted stream.| Constructor and Description | 
|---|
FixedLengthFieldFormat()
Constructs a new FixedLengthFieldFormat. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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. 
 | 
void | 
setLenientPadding(boolean lenientPadding)
Sets whether the padding length is enforced. 
 | 
getName, getPadding, getPosition, getUntil, insertField, insertValue, isLazy, isNillable, setLazy, setName, setPadding, setPosition, setUntil, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinsertField, insertValue, isLazy, isNillablepublic FixedLengthFieldFormat()
public String extract(UnmarshallingContext context, boolean reportErrors)
FieldFormatMay 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 FieldFormatextract in class FlatFieldFormatSupportcontext - the UnmarshallingContext holding the recordpublic String extractFieldText(UnmarshallingContext context, boolean reporting)
extractFieldText in class FlatFieldFormatSupportpublic void insertFieldText(MarshallingContext context, String fieldText, boolean commit)
insertFieldText in class FlatFieldFormatSupportpublic int getSize()
FieldFormatgetSize in interface FieldFormatgetSize in class FlatFieldFormatSupportpublic void setKeepPadding(boolean keepPadding)
keepPadding - true to keep paddingpublic void setLenientPadding(boolean lenientPadding)
lenientPadding - true if not enforced, false otherwise