BeanIO 2.0.4

org.beanio.internal.parser.format.flat
Interface FlatFieldFormat

All Superinterfaces:
FieldFormat
All Known Implementing Classes:
DelimitedFieldFormat, FixedLengthFieldFormat, FlatFieldFormatSupport

public interface FlatFieldFormat
extends FieldFormat

A FlatFieldFormat is a FieldFormat for flat stream formats (i.e. CSV, delimited and fixed length).

Since:
2.0
Author:
Kevin Seim

Method Summary
 int getPosition()
          Returns the field position.
 
Methods inherited from interface org.beanio.internal.parser.FieldFormat
extract, getSize, insertField, insertValue, isLazy, isNillable
 

Method Detail

getPosition

int getPosition()
Returns the field position.

In a delimited/CSV stream format, the position is the index of the field in the record starting at 0. For example, the position of field2 in the following comma delimited record is 1:

field1,field2,field3

In a fixed length stream format, the position is the index of the first character of the field in the record, also starting at 0. For example, the position of field2 in the following record is 6:

field1field2field3

Returns:
the field position

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim