Class RightPadder
java.lang.Object
org.jpos.iso.RightPadder
- All Implemented Interfaces:
Padder
- Direct Known Subclasses:
RightTPadder
Implements the Padder interface for padding strings and byte arrays on the
Right.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RightPadderA padder for padding spaces on the right. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SPACE_PADDER
A padder for padding spaces on the right. This is very common in alphabetic fields.
-
-
Constructor Details
-
RightPadder
Creates a Right Padder with a specific pad character.- Parameters:
pad- The padding character. For binary padders, the pad character is truncated to lower order byte.
-
-
Method Details
-
pad
Description copied from interface:PadderReturns a padded string upto a maximum length. If the data is longer than maxLength, then the data is truncated.- Specified by:
padin interfacePadder- Parameters:
data- The string to pad.maxLength- The maximum length of the padded string.- Returns:
- A padded string.
- Throws:
ISOException- on error
-
unpad
-