com.univocity.parsers.annotations
Annotation Type FixedWidth


@Retention(value=RUNTIME)
@Inherited
@Target(value={FIELD,METHOD,ANNOTATION_TYPE})
public @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

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
FixedWidthFields, FixedWidthParser, FixedWidthWriter, FixedWidthParserSettings, FixedWidthWriterSettings, BeanProcessor, BeanWriterProcessor

Optional Element Summary
 FieldAlignment alignment
          Sets the alignment of the fixed-width field
 int from
          Defines the starting position of the fixed-width field
 char padding
          Sets the padding character of the fixed-width field
 int to
          Defines the end position of the fixed-width field
 int value
          Sets the length of the fixed-width field
 

value

public abstract int value
Sets the length of the fixed-width field

Returns:
length of the fixed-width field
Default:
-1

alignment

public abstract FieldAlignment alignment
Sets the alignment of the fixed-width field

Returns:
alignment of the fixed-width field
Default:
com.univocity.parsers.fixed.FieldAlignment.LEFT

padding

public abstract char padding
Sets the padding character of the fixed-width field

Returns:
padding of the fixed-width field
Default:
32

from

public abstract int from
Defines the starting position of the fixed-width field

Returns:
Defines the starting position of the fixed-width field
Default:
-1

to

public abstract int to
Defines the end position of the fixed-width field

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


Copyright © 2017 uniVocity Software Pty Ltd. All rights reserved.