Top Description Constructors Methods
com.univocity.parsers.fixed

public Class FixedWidthFieldLengths

extends FixedWidthFields
Class Inheritance
Annotations
@Deprecated
Imports
java.util.*

Deprecated

This class has been modified over time and its name became misleading. Use FixedWidthFields instead.

This class provides the name, length, alignment and padding of each field in a fixed-width record.
Author
Univocity Software Pty Ltd - [email protected]

Constructor Summary

AccessConstructor and Description
public
FixedWidthFieldLengths(LinkedHashMap<String, Integer>
a LinkedHashMap containing the sequence of fields to be associated with each column in the input/output, with their respective length.
fields
)

Defines a sequence of field names used to refer to columns in the input/output text of an entity, along with their lengths.

public
FixedWidthFieldLengths(String[]
the sequence of fields to be associated with each column in the input/output
headers
,
int[]
the sequence of lengths to be associated with each given header. The size of this array must match the number of given headers.
lengths
)

Defines a sequence of field names used to refer to columns in the input/output text of an entity, along with their lengths.

public
FixedWidthFieldLengths(int...
The number lengths of all fields in a fixed-width record. All lengths must be greater than 0.
fieldLengths
)

Creates a new instance initialized with the lengths of all fields in a fixed-width record.

Method Summary

Inherited from com.univocity.parsers.fixed.FixedWidthFields:
addFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldaddFieldcloneforParsingforWritinggetAlignmentgetAlignmentgetAllLengthsgetFieldAlignmentsgetFieldLengthsgetFieldNamesgetFieldPaddingsgetFieldPaddingsgetFieldsPerRecordgetFieldsToIgnoregetKeepPaddingFlagsindexOfkeepPaddingOnkeepPaddingOnsetAlignmentsetAlignmentsetFieldLengthsetFieldLengthsetHeadersIfPossiblesetPaddingsetPaddingstripPaddingFromstripPaddingFromtoString

Constructor Detail

FixedWidthFieldLengthsback to summary
public FixedWidthFieldLengths(LinkedHashMap<String, Integer> fields)

Defines a sequence of field names used to refer to columns in the input/output text of an entity, along with their lengths. The field names defined will be used as headers, having the same effect of a call to FixedWidthParserSettings#setHeaders(String...).

Parameters
fields:LinkedHashMap<String, Integer>

a LinkedHashMap containing the sequence of fields to be associated with each column in the input/output, with their respective length.

FixedWidthFieldLengthsback to summary
public FixedWidthFieldLengths(String[] headers, int[] lengths)

Defines a sequence of field names used to refer to columns in the input/output text of an entity, along with their lengths. The field names defined will be used as headers, having the same effect of a call to FixedWidthParserSettings#setHeaders(String...).

Parameters
headers:String[]

the sequence of fields to be associated with each column in the input/output

lengths:int[]

the sequence of lengths to be associated with each given header. The size of this array must match the number of given headers.

FixedWidthFieldLengthsback to summary
public FixedWidthFieldLengths(int... fieldLengths)

Creates a new instance initialized with the lengths of all fields in a fixed-width record.

Parameters
fieldLengths:int[]

The number lengths of all fields in a fixed-width record. All lengths must be greater than 0.