Modifier and Type | Field and Description |
---|---|
static LeftPadder |
ZERO_PADDER
A padder for padding zeros on the left.
|
Constructor and Description |
---|
LeftPadder(char pad)
Creates a Left Padder with a specific pad character.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
pad(java.lang.String data,
int maxLength)
Returns a padded string upto a maximum length.
|
java.lang.String |
unpad(java.lang.String paddedData)
(non-Javadoc)
|
public static final LeftPadder ZERO_PADDER
public LeftPadder(char pad)
pad
- The padding character. For binary padders, the pad character
is truncated to lower order byte.public java.lang.String pad(java.lang.String data, int maxLength) throws ISOException
Padder
pad
in interface Padder
data
- The string to pad.maxLength
- The maximum length of the padded string.ISOException
- on error