Package org.beanio.stream.fixedlength
Class FixedLengthRecordParserFactory
- java.lang.Object
-
- org.beanio.stream.fixedlength.FixedLengthParserConfiguration
-
- org.beanio.stream.fixedlength.FixedLengthRecordParserFactory
-
- All Implemented Interfaces:
RecordParserFactory
public class FixedLengthRecordParserFactory extends FixedLengthParserConfiguration implements RecordParserFactory
DefaultRecordParserFactoryfor the fixed length stream format.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description FixedLengthRecordParserFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordMarshallercreateMarshaller()Creates a parser for marshalling records.RecordReadercreateReader(java.io.Reader in)Creates a parser for reading records from an input stream.RecordUnmarshallercreateUnmarshaller()Creates a parser for unmarshalling records.RecordWritercreateWriter(java.io.Writer out)Creates a parser for writing records to an output stream.voidinit()Initializes the factory.-
Methods inherited from class org.beanio.stream.fixedlength.FixedLengthParserConfiguration
getComments, getLineContinuationCharacter, getLineSeparator, getRecordTerminator, isCommentEnabled, isLineContinationEnabled, setComments, setLineContinuationCharacter, setLineSeparator, setRecordTerminator
-
-
-
-
Method Detail
-
init
public void init() throws BeanIOConfigurationExceptionDescription copied from interface:RecordParserFactoryInitializes the factory. This method is called when a mapping file is loaded after all parser properties have been set, and is therefore ideally used to preemptively validate parser configuration settings.- Specified by:
initin interfaceRecordParserFactory- Throws:
BeanIOConfigurationException
-
createReader
public RecordReader createReader(java.io.Reader in) throws java.lang.IllegalArgumentException
Description copied from interface:RecordParserFactoryCreates a parser for reading records from an input stream.- Specified by:
createReaderin interfaceRecordParserFactory- Parameters:
in- the input stream to read from- Returns:
- the created
RecordReader - Throws:
java.lang.IllegalArgumentException- if this factory is improperly configured and aRecordReadercannot be created
-
createWriter
public RecordWriter createWriter(java.io.Writer out) throws java.lang.IllegalArgumentException
Description copied from interface:RecordParserFactoryCreates a parser for writing records to an output stream.- Specified by:
createWriterin interfaceRecordParserFactory- Parameters:
out- the output stream to write to- Returns:
- the new
RecordWriter - Throws:
java.lang.IllegalArgumentException- if this factory is improperly configured and aRecordWritercannot be created
-
createMarshaller
public RecordMarshaller createMarshaller() throws java.lang.IllegalArgumentException
Description copied from interface:RecordParserFactoryCreates a parser for marshalling records.- Specified by:
createMarshallerin interfaceRecordParserFactory- Returns:
- the created
RecordMarshaller - Throws:
java.lang.IllegalArgumentException- if this factory is improperly configured and aRecordMarshallercannot be created
-
createUnmarshaller
public RecordUnmarshaller createUnmarshaller() throws java.lang.IllegalArgumentException
Description copied from interface:RecordParserFactoryCreates a parser for unmarshalling records.- Specified by:
createUnmarshallerin interfaceRecordParserFactory- Returns:
- the created
RecordUnmarshaller - Throws:
java.lang.IllegalArgumentException- if this factory is improperly configured and aRecordUnmarshallercannot be created
-
-