BeanIO 2.0.4

org.beanio.stream.csv
Class CsvRecordParserFactory

java.lang.Object
  extended by org.beanio.stream.csv.CsvParserConfiguration
      extended by org.beanio.stream.csv.CsvRecordParserFactory
All Implemented Interfaces:
RecordParserFactory

public class CsvRecordParserFactory
extends CsvParserConfiguration
implements RecordParserFactory

Default RecordParserFactory for the CSV stream format.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
CsvRecordParserFactory()
          Constructs a new CsvRecordParserFactory.
 
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.csv.CsvParserConfiguration
getComments, getDelimiter, getEscape, getLineSeparator, getQuote, getRecordTerminator, isAlwaysQuote, isCommentEnabled, isEscapeEnabled, isMultilineEnabled, isUnquotedQuotesAllowed, isWhitespaceAllowed, setAlwaysQuote, setComments, setDelimiter, setEscape, setLineSeparator, setMultilineEnabled, setQuote, setRecordTerminator, setUnquotedQuotesAllowed, setWhitespaceAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvRecordParserFactory

public CsvRecordParserFactory()
Constructs a new CsvRecordParserFactory.

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