BeanIO 1.2.3

org.beanio.parser.delimited
Class DelimitedStreamDefinition

java.lang.Object
  extended by org.beanio.parser.StreamDefinition
      extended by org.beanio.parser.delimited.DelimitedStreamDefinition
All Implemented Interfaces:
MessageFactory
Direct Known Subclasses:
CsvStreamDefinition

public class DelimitedStreamDefinition
extends StreamDefinition

A DelimitedStreamDefinition is used to parse and format streams that use a fixed length record format.

Since:
1.0
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.parser.StreamDefinition
READ_ONLY_MODE, READ_WRITE_MODE, WRITE_ONLY_MODE
 
Constructor Summary
  DelimitedStreamDefinition()
          Constructs a new DelimitedStreamDefinition.
protected DelimitedStreamDefinition(String format)
          Constructs a new DelimitedStreamDefinition.
 
Method Summary
protected  RecordReader createDefaultReader(Reader in)
          Creates a default RecordReader to read from the given input stream.
protected  RecordWriter createDefaultWriter(Writer out)
          Creates a default RecordWriter for writing to the given output stream.
protected  Record createRecord()
          Constructs a new Record for this stream to operate on.
 
Methods inherited from class org.beanio.parser.StreamDefinition
createBeanReader, createBeanWriter, createRecord, createRecordReader, createRecordWriter, getFieldErrorMessage, getFieldLabel, getFormat, getLabel, getMode, getName, getRecordErrorMessage, getRecordLabel, getRootGroupDefinition, newGroupDefinition, newGroupNode, newRecordNode, setDefaultResourceBundle, setMaxOccurs, setMinOccurs, setMode, setName, setReaderFactory, setResourceBundle, setWriterFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelimitedStreamDefinition

public DelimitedStreamDefinition()
Constructs a new DelimitedStreamDefinition.


DelimitedStreamDefinition

protected DelimitedStreamDefinition(String format)
Constructs a new DelimitedStreamDefinition.

Parameters:
format - the stream format
Method Detail

createRecord

protected Record createRecord()
Description copied from class: StreamDefinition
Constructs a new Record for this stream to operate on.

Overrides:
createRecord in class StreamDefinition
Returns:
new Record

createDefaultReader

protected RecordReader createDefaultReader(Reader in)
Description copied from class: StreamDefinition
Creates a default RecordReader to read from the given input stream. This method is called by StreamDefinition.createRecordReader(Reader) if no record reader factory was configured.

Specified by:
createDefaultReader in class StreamDefinition
Parameters:
in - the input stream to read from
Returns:
a new RecordReader

createDefaultWriter

protected RecordWriter createDefaultWriter(Writer out)
Description copied from class: StreamDefinition
Creates a default RecordWriter for writing to the given output stream. This method is called by StreamDefinition.createRecordWriter(Writer) if no record writer factory was configured.

Specified by:
createDefaultWriter in class StreamDefinition
Parameters:
out - the output stream to write to
Returns:
a new RecordWriter

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim