Annotation Interface FixedLengthRecord


@Documented @Retention(RUNTIME) public @interface FixedLengthRecord
This annotation represents the root class of the model. When a fixed-length record must be described in the model we will use this annotation to split the data during the unmarshal process.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Indicates how chars are counted
    Character to be used to add a carriage return after each record (optional).
    Character to be used to process considering end of line after each record while unmarshalling (optional - default: "", which help default JDK provided line delimiter to be used unless any other line delimiter provided) This option is used only during unmarshalling, where marshalling uses system default provided line delimiter as "WINDOWS" unless any other value is provided.
    Indicates that the record(s) of this type may be followed by a single footer record at the end of the file
    Indicates that the record(s) of this type may be preceded by a single header record at the beginning of in the file
    boolean
    Indicates whether too short lines will be ignored
    boolean
    Indicates that characters beyond the last mapped filed can be ignored when unmarshalling / parsing.
    int
    The fixed length of the record (number of characters).
    Name describing the record (optional)
    char
    The char to pad with.
    boolean
    Configures the data format to skip marshalling / unmarshalling of the footer record.
    boolean
    Configures the data format to skip marshalling / unmarshalling of the header record.
  • Element Details

    • name

      String name
      Name describing the record (optional)
      Returns:
      String
      Default:
      ""
    • crlf

      String crlf
      Character to be used to add a carriage return after each record (optional). Possible values: WINDOWS, UNIX, MAC, or custom. This option is used only during marshalling, whereas unmarshalling uses system default JDK provided line delimiter unless eol is customized.
      Returns:
      String
      Default:
      "WINDOWS"
    • eol

      String eol
      Character to be used to process considering end of line after each record while unmarshalling (optional - default: "", which help default JDK provided line delimiter to be used unless any other line delimiter provided) This option is used only during unmarshalling, where marshalling uses system default provided line delimiter as "WINDOWS" unless any other value is provided.
      Returns:
      String
      Default:
      ""
    • paddingChar

      char paddingChar
      The char to pad with.
      Returns:
      the char to pad with if the record is set to a fixed length;
      Default:
      ' '
    • length

      int length
      The fixed length of the record (number of characters). It means that the record will always be that long padded with {#paddingChar()}'s
      Returns:
      the length of the record.
      Default:
      0
    • header

      Class<?> header
      Indicates that the record(s) of this type may be preceded by a single header record at the beginning of in the file
      Default:
      void.class
    • footer

      Class<?> footer
      Indicates that the record(s) of this type may be followed by a single footer record at the end of the file
      Default:
      void.class
    • skipHeader

      boolean skipHeader
      Configures the data format to skip marshalling / unmarshalling of the header record. Configure this parameter on the primary record (e.g., not the header or footer).
      Default:
      false
    • skipFooter

      boolean skipFooter
      Configures the data format to skip marshalling / unmarshalling of the footer record. Configure this parameter on the primary record (e.g., not the header or footer).
      Default:
      false
    • ignoreTrailingChars

      boolean ignoreTrailingChars
      Indicates that characters beyond the last mapped filed can be ignored when unmarshalling / parsing. This annotation is associated to the root class of the model and must be declared one time.
      Default:
      false
    • ignoreMissingChars

      boolean ignoreMissingChars
      Indicates whether too short lines will be ignored
      Default:
      false
    • countGrapheme

      boolean countGrapheme
      Indicates how chars are counted
      Default:
      false