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
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSets the alignment of the fixed-width fieldint
Defines the starting position of the fixed-width fieldboolean
Configures whether to retain the padding character when parsing values for this field (defaults tofalse
)char
Sets the padding character of the fixed-width fieldint
Defines the end position of the fixed-width fieldint
Sets the length of the fixed-width field
-
Element Details
-
value
int valueSets the length of the fixed-width field- Returns:
- length of the fixed-width field
- Default:
- -1
-
alignment
FieldAlignment alignmentSets the alignment of the fixed-width field- Returns:
- alignment of the fixed-width field
- Default:
- LEFT
-
padding
char paddingSets the padding character of the fixed-width field- Returns:
- padding of the fixed-width field
- Default:
- ' '
-
keepPadding
boolean keepPaddingConfigures whether to retain the padding character when parsing values for this field (defaults tofalse
)- Returns:
- flag indicating the padding character should be kept in the parsed value
- Default:
- false
-
from
int fromDefines the starting position of the fixed-width field- Returns:
- Defines the starting position of the fixed-width field
- Default:
- -1
-
to
int toDefines the end position of the fixed-width field- Returns:
- Defines the end position of the fixed-width field
- Default:
- -1
-