BeanIO 2.0.4

org.beanio.stream.delimited
Class DelimitedRecordParserFactory

java.lang.Object
  extended by org.beanio.stream.delimited.DelimitedParserConfiguration
      extended by org.beanio.stream.delimited.DelimitedRecordParserFactory
All Implemented Interfaces:
RecordParserFactory

public class DelimitedRecordParserFactory
extends DelimitedParserConfiguration
implements RecordParserFactory

Default RecordParserFactory for the delimited stream format.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
DelimitedRecordParserFactory()
          Constructs a new DelimitedRecordParserFactory.
 
Method Summary
 RecordMarshaller createMarshaller()
          Creates a parser for marshalling records.
 RecordReader createReader(Reader in)
          Creates a parser for reading records from an input stream.
 RecordUnmarshaller createUnmarshaller()
          Creates a parser for unmarshalling records.
 RecordWriter createWriter(Writer out)
          Creates a parser for writing records to an output stream.
 void init()
          Initializes the factory.
 
Methods inherited from class org.beanio.stream.delimited.DelimitedParserConfiguration
getComments, getDelimiter, getEscape, getLineContinuationCharacter, getRecordTerminator, isCommentEnabled, isEscapeEnabled, isLineContinationEnabled, setComments, setDelimiter, setEscape, setLineContinuationCharacter, setRecordTerminator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelimitedRecordParserFactory

public DelimitedRecordParserFactory()
Constructs a new DelimitedRecordParserFactory.

Method Detail

init

public void init()
          throws IllegalArgumentException
Description copied from interface: RecordParserFactory
Initializes 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:
init in interface RecordParserFactory
Throws:
IllegalArgumentException - if the parser configuration is invalid

createReader

public RecordReader createReader(Reader in)
                          throws IllegalArgumentException
Description copied from interface: RecordParserFactory
Creates a parser for reading records from an input stream.

Specified by:
createReader in interface RecordParserFactory
Parameters:
in - the input stream to read from
Returns:
the created RecordReader
Throws:
IllegalArgumentException - if this factory is improperly configured and a RecordReader cannot be created

createWriter

public RecordWriter createWriter(Writer out)
                          throws IllegalArgumentException
Description copied from interface: RecordParserFactory
Creates a parser for writing records to an output stream.

Specified by:
createWriter in interface RecordParserFactory
Parameters:
out - the output stream to write to
Returns:
the new RecordWriter
Throws:
IllegalArgumentException - if this factory is improperly configured and a RecordWriter cannot be created

createMarshaller

public RecordMarshaller createMarshaller()
                                  throws IllegalArgumentException
Description copied from interface: RecordParserFactory
Creates a parser for marshalling records.

Specified by:
createMarshaller in interface RecordParserFactory
Returns:
the created RecordMarshaller
Throws:
IllegalArgumentException - if this factory is improperly configured and a RecordMarshaller cannot be created

createUnmarshaller

public RecordUnmarshaller createUnmarshaller()
                                      throws IllegalArgumentException
Description copied from interface: RecordParserFactory
Creates a parser for unmarshalling records.

Specified by:
createUnmarshaller in interface RecordParserFactory
Returns:
the created RecordUnmarshaller
Throws:
IllegalArgumentException - if this factory is improperly configured and a RecordUnmarshaller cannot be created

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim