org.beanio.parser.fixedlength
Class FixedLengthBeanDefinition
java.lang.Object
org.beanio.parser.PropertyDefinition
org.beanio.parser.BeanDefinition
org.beanio.parser.flat.FlatBeanDefinition
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
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.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 |
FixedLengthBeanDefinition
public FixedLengthBeanDefinition()
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 objectposition
- the field positiontext
- 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
Copyright © 2010-2012 Kevin Seim