Package org.jpos.iso

Interface Padder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
    • Method Detail

      • pad

        java.lang.String pad​(java.lang.String data,
                             int maxLength)
                      throws ISOException
        Returns a padded string upto a maximum length. If the data is longer than maxLength, then the data is truncated.
        Parameters:
        data - The string to pad.
        maxLength - The maximum length of the padded string.
        Returns:
        A padded string.
        Throws:
        ISOException - on error
      • unpad

        java.lang.String unpad​(java.lang.String paddedData)
                        throws ISOException
        Removes the padding from a padded string.
        Parameters:
        paddedData - The string to unpad.
        Returns:
        The unpadded string.
        Throws:
        ISOException - on error