Class FlatPreprocessor
- java.lang.Object
-
- org.beanio.internal.compiler.ProcessorSupport
-
- org.beanio.internal.compiler.Preprocessor
-
- org.beanio.internal.compiler.flat.FlatPreprocessor
-
- Direct Known Subclasses:
FixedLengthPreprocessor
public class FlatPreprocessor extends Preprocessor
Base class forPreprocessor
implementations for flat stream formats (i.e. CSV, delimited, and fixed length).- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.beanio.internal.compiler.Preprocessor
propertyRoot, stream
-
-
Constructor Summary
Constructors Constructor Description FlatPreprocessor(StreamConfig stream)
Constructs a newFlatPreprocessor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalizeRecord(RecordConfig record)
Finalizes a record configuration after its children have been processed.protected void
finalizeSegment(SegmentConfig segment)
Finalizes a segment configuration after its children have been processed.protected int
getSize(FieldConfig field)
Returns the size of a field.protected void
handleField(FieldConfig field)
Processes a field configuration.protected void
initializeRecord(RecordConfig record)
Initializes a record configuration before its children have been processed.protected void
initializeSegment(SegmentConfig segment)
Initializes a segment configuration before its children have been processed.protected boolean
isFixedLength()
Returns whether the stream format is fixed length.-
Methods inherited from class org.beanio.internal.compiler.Preprocessor
finalizeGroup, finalizeStream, handleConstant, initializeGroup, initializeStream, validateRecordIdentifyingCriteria
-
Methods inherited from class org.beanio.internal.compiler.ProcessorSupport
getParent, handleComponent, process
-
-
-
-
Constructor Detail
-
FlatPreprocessor
public FlatPreprocessor(StreamConfig stream)
Constructs a newFlatPreprocessor
.- Parameters:
stream
-
-
-
Method Detail
-
initializeRecord
protected void initializeRecord(RecordConfig record)
Description copied from class:Preprocessor
Initializes a record configuration before its children have been processed.- Overrides:
initializeRecord
in classPreprocessor
- Parameters:
record
- the record configuration to process
-
finalizeRecord
protected void finalizeRecord(RecordConfig record)
Description copied from class:Preprocessor
Finalizes a record configuration after its children have been processed.- Overrides:
finalizeRecord
in classPreprocessor
- Parameters:
record
- the record configuration to process
-
initializeSegment
protected void initializeSegment(SegmentConfig segment) throws BeanIOConfigurationException
Description copied from class:Preprocessor
Initializes a segment configuration before its children have been processed.- Overrides:
initializeSegment
in classPreprocessor
- Parameters:
segment
- the segment configuration to process- Throws:
BeanIOConfigurationException
-
finalizeSegment
protected void finalizeSegment(SegmentConfig segment)
Description copied from class:Preprocessor
Finalizes a segment configuration after its children have been processed.- Overrides:
finalizeSegment
in classPreprocessor
- Parameters:
segment
- the segment configuration to process
-
handleField
protected void handleField(FieldConfig field)
Description copied from class:Preprocessor
Processes a field configuration.- Overrides:
handleField
in classPreprocessor
- Parameters:
field
- the field configuration to process
-
getSize
protected int getSize(FieldConfig field)
Returns the size of a field.- Parameters:
field
- the field to size- Returns:
- the field size
-
isFixedLength
protected boolean isFixedLength()
Returns whether the stream format is fixed length.- Returns:
- true if fixed length, false otherwise
-
-