Annotation 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
Modifier and TypeOptional ElementDescriptionboolean
Indicates how chars are countedCharacter 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.Class<?>
Indicates that the record(s) of this type may be followed by a single footer record at the end of the fileClass<?>
Indicates that the record(s) of this type may be preceded by a single header record at the beginning of in the fileboolean
Indicates whether too short lines will be ignoredboolean
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 nameName describing the record (optional)- Returns:
- String
- Default:
- ""
-
crlf
String crlfCharacter 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 eolCharacter 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 paddingCharThe char to pad with.- Returns:
- the char to pad with if the record is set to a fixed length;
- Default:
- ' '
-
length
int lengthThe 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<?> headerIndicates 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
-
skipHeader
boolean skipHeaderConfigures 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
-
ignoreTrailingChars
boolean ignoreTrailingCharsIndicates 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 ignoreMissingCharsIndicates whether too short lines will be ignored- Default:
- false
-
countGrapheme
boolean countGraphemeIndicates how chars are counted- Default:
- false
-