Class RightTPadder
java.lang.Object
org.jpos.iso.RightPadder
org.jpos.iso.RightTPadder
- All Implemented Interfaces:
Padder
Implements the Padder interface for padding strings and byte arrays on the
Right. The difference between this and RightPadder is that this truncates the data
during packing, instead of throwing an exception.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RightTPadderA padder for padding spaces on the right. -
Constructor Summary
ConstructorsConstructorDescriptionRightTPadder(char pad) Creates a Right Truncating Padder with a specific pad character. -
Method Summary
Methods inherited from class RightPadder
unpad
-
Field Details
-
SPACE_PADDER
A padder for padding spaces on the right. This is very common in alphabetic fields.
-
-
Constructor Details
-
RightTPadder
Creates a Right Truncating 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- Overrides:
padin classRightPadder- Parameters:
data- The string to pad.maxLength- The maximum length of the padded string.- Returns:
- A padded string.
- Throws:
ISOException- on error- See Also:
-