public class RightPadder extends java.lang.Object implements Padder
Modifier and Type | Field and Description |
---|---|
static RightPadder |
SPACE_PADDER
A padder for padding spaces on the right.
|
Constructor and Description |
---|
RightPadder(char pad)
Creates a Right 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)
Removes the padding from a padded string.
|
public static final RightPadder SPACE_PADDER
public RightPadder(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