Annotation Interface FixedWidth


The @FixedWidth annotation, along with the Parsed annotation, allows users to configure the length, alignment and padding of fields parsed/written using the FixedWidthParser and FixedWidthWriter

Commonly used for java beans processed using BeanProcessor and/or BeanWriterProcessor

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Sets the alignment of the fixed-width field
    int
    Defines the starting position of the fixed-width field
    boolean
    Configures whether to retain the padding character when parsing values for this field (defaults to false)
    char
    Sets the padding character of the fixed-width field
    int
    Defines the end position of the fixed-width field
    int
    Sets the length of the fixed-width field
  • Element Details

    • value

      int value
      Sets the length of the fixed-width field
      Returns:
      length of the fixed-width field
      Default:
      -1
    • alignment

      FieldAlignment alignment
      Sets the alignment of the fixed-width field
      Returns:
      alignment of the fixed-width field
      Default:
      LEFT
    • padding

      char padding
      Sets the padding character of the fixed-width field
      Returns:
      padding of the fixed-width field
      Default:
      ' '
    • keepPadding

      boolean keepPadding
      Configures whether to retain the padding character when parsing values for this field (defaults to false)
      Returns:
      flag indicating the padding character should be kept in the parsed value
      Default:
      false
    • from

      int from
      Defines the starting position of the fixed-width field
      Returns:
      Defines the starting position of the fixed-width field
      Default:
      -1
    • to

      int to
      Defines the end position of the fixed-width field
      Returns:
      Defines the end position of the fixed-width field
      Default:
      -1