Interface Padder

  • All Known Implementing Classes:
    AbstractLeftPadder, AbstractPadder, AbstractRightPadder, SpaceLeftPadder, SpaceRightPadder, ZeroLeftPadder, ZeroRightPadder

    public interface Padder
    Used when writing records to a file. Some record definitions require data to be left or right padded. By default the Marshaller will left pad using spaces. JRecordBind comes with 4 built-in padders that left or right pad using spaces or zeros. If you need a different padding, you can specify it by implementing this interface.
    The default padder is specified in the "main" tag of the record definition, and each element can have its own specific padder
    • Method Detail

      • pad

        String pad​(String input,
                   int length)
        Pads a string to the given length
        Parameters:
        input - the string to pad
        length - the length of the final string
        Returns:
        the padded string