Annotation Type 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
- Author:
- Univocity Software Pty Ltd - dev@univocity.com
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSets the alignment of the fixed-width fieldintDefines the starting position of the fixed-width fieldbooleanConfigures whether to retain the padding character when parsing values for this field (defaults tofalse)charSets the padding character of the fixed-width fieldintDefines the end position of the fixed-width fieldintSets 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
-