Top Description Methods
com.univocity.parsers.annotations

public @Interface FixedWidth

extends Annotation
Annotations
@Retention:RUNTIME
@Inherited
@Target:FIELD, METHOD, ANNOTATION_TYPE
Imports
com.univocity.parsers.common.processor.*, com.univocity.parsers.fixed.*, java.lang.annotation.*

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 - [email protected]
See Also
FixedWidthFields, FixedWidthParser, FixedWidthWriter, FixedWidthParserSettings, FixedWidthWriterSettings, BeanProcessor, BeanWriterProcessor

Method Summary

Modifier and TypeMethod and Description
public FieldAlignment

Returns:

alignment of the fixed-width field
alignment
()

Sets the alignment of the fixed-width field

public int

Returns:

Defines the starting position of the fixed-width field
from
()

Defines the starting position of the fixed-width field

public boolean

Returns:

flag indicating the padding character should be kept in the parsed value
keepPadding
()

Configures whether to retain the padding character when parsing values for this field (defaults to false)

public char

Returns:

padding of the fixed-width field
padding
()

Sets the padding character of the fixed-width field

public int

Returns:

Defines the end position of the fixed-width field
to
()

Defines the end position of the fixed-width field

public int

Returns:

length of the fixed-width field
value
()

Sets the length of the fixed-width field

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

alignmentback to summary
public FieldAlignment alignment()

Sets the alignment of the fixed-width field

Returns:FieldAlignment

alignment of the fixed-width field

fromback to summary
public int from()

Defines the starting position of the fixed-width field

Returns:int

Defines the starting position of the fixed-width field

keepPaddingback to summary
public boolean keepPadding()

Configures whether to retain the padding character when parsing values for this field (defaults to false)

Returns:boolean

flag indicating the padding character should be kept in the parsed value

paddingback to summary
public char padding()

Sets the padding character of the fixed-width field

Returns:char

padding of the fixed-width field

toback to summary
public int to()

Defines the end position of the fixed-width field

Returns:int

Defines the end position of the fixed-width field

valueback to summary
public int value()

Sets the length of the fixed-width field

Returns:int

length of the fixed-width field