BeanIO 1.2.3

org.beanio.parser.fixedlength
Class FixedLengthBeanDefinition

java.lang.Object
  extended by org.beanio.parser.PropertyDefinition
      extended by org.beanio.parser.BeanDefinition
          extended by org.beanio.parser.flat.FlatBeanDefinition
              extended by org.beanio.parser.fixedlength.FixedLengthBeanDefinition

public class FixedLengthBeanDefinition
extends FlatBeanDefinition

A FixedLengthRecordDefinition is used to parse and format fixed length formatted beans.

Since:
1.0
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.parser.PropertyDefinition
INVALID, MISSING
 
Constructor Summary
FixedLengthBeanDefinition()
           
 
Method Summary
 Object formatRecord(Object bean)
          Formats a Java bean into a record (whose class type will depend on the type of stream and record writer being used).
 char getFiller()
          Returns the filler character used to fill undefined spaces in the record.
 void setFiller(char filler)
          Sets the filler character to use to fill undefined spaces in the record.
protected  void updateRecord(Object recordObject, int position, String text)
          This method is called by formatRecord to set the field text on the record object being formatted.
 
Methods inherited from class org.beanio.parser.flat.FlatBeanDefinition
formatRecord
 
Methods inherited from class org.beanio.parser.BeanDefinition
addProperty, defines, getAllFields, getBeanProperty, getProperty, getPropertyCount, getPropertyList, isBean, isBeanExistenceKnown, isDefinitionFor, isPropertyTypeMap, isRecordIdentifer, matches, parsePropertyValue, setBeanProperty, setPropertyList, setPropertyType, setRecordIdentifer
 
Methods inherited from class org.beanio.parser.PropertyDefinition
getCollectionType, getLength, getMaxOccurs, getMinOccurs, getName, getParent, getPropertyDescriptor, getPropertyType, isArray, isCollection, isConstant, isField, isLazy, isProperty, isRecordIdentifier, parseValue, setCollectionType, setLazy, setLength, setMaxOccurs, setMinOccurs, setName, setParent, setProperty, setPropertyDescriptor, setRecordIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLengthBeanDefinition

public FixedLengthBeanDefinition()
Method Detail

formatRecord

public Object formatRecord(Object bean)
Description copied from class: BeanDefinition
Formats a Java bean into a record (whose class type will depend on the type of stream and record writer being used).

Specified by:
formatRecord in class BeanDefinition
Parameters:
bean - the bean to format
Returns:
the formatted record

updateRecord

protected void updateRecord(Object recordObject,
                            int position,
                            String text)
Description copied from class: FlatBeanDefinition
This method is called by formatRecord to set the field text on the record object being formatted.

Specified by:
updateRecord in class FlatBeanDefinition
Parameters:
recordObject - the record object
position - the field position
text - the field text

getFiller

public char getFiller()
Returns the filler character used to fill undefined spaces in the record. Defaults to a space.

Returns:
the filler character

setFiller

public void setFiller(char filler)
Sets the filler character to use to fill undefined spaces in the record.

Parameters:
filler - the filler character

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim