public class FixedLengthFieldPadding extends FieldPadding
FieldPadding
implementation for a fixed length field.
Fixed length padding differs from other field padding in that a completely blank optional field (i.e. all spaces) is formatted as the empty string regardless of the filler character, thus allowing for optional numeric fields.
LEFT, RIGHT
Constructor and Description |
---|
FixedLengthFieldPadding()
Constructs a new FixedLengthFieldPadding.
|
Modifier and Type | Method and Description |
---|---|
void |
init()
Initializes padding settings.
|
String |
unpad(String fieldText)
Removes padding from the field text.
|
getFiller, getJustify, getLength, getPropertyType, isOptional, pad, setFiller, setJustify, setLength, setOptional, setPaddedNull, setPropertyType
public FixedLengthFieldPadding()
public void init()
FieldPadding
FieldPadding.pad(String)
or FieldPadding.unpad(String)
is called.init
in class FieldPadding
public String unpad(String fieldText)
FieldPadding
unpad
in class FieldPadding
fieldText
- the field text to remove padding