BeanIO 2.0.4

org.beanio.internal.parser
Class StreamFormatSupport

java.lang.Object
  extended by org.beanio.internal.parser.StreamFormatSupport
All Implemented Interfaces:
StreamFormat
Direct Known Subclasses:
DelimitedStreamFormat, FixedLengthStreamFormat, JsonStreamFormat, XmlStreamFormat

public abstract class StreamFormatSupport
extends Object
implements StreamFormat

Base class for StreamFormat implementations.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
StreamFormatSupport()
          Constructs a new StreamFormatSupport.
 
Method Summary
 RecordMarshaller createRecordMarshaller()
          Creates a new record marshaller.
 RecordReader createRecordReader(Reader in)
          Creates a new RecordReader to read from the given input stream.
 RecordUnmarshaller createRecordUnmarshaller()
          Creates a new record unmarshaller.
 RecordWriter createRecordWriter(Writer out)
          Creates a new RecordWriter for writing to the given output stream.
 String getName()
          Returns the name of the stream.
protected  RecordParserFactory getRecordParserFactory()
          Returns the RecordParserFactory used by this stream.
 void setName(String name)
          Sets the name of this stream.
 void setRecordParserFactory(RecordParserFactory recordParserFactory)
          Sets the RecordParserFactory for creating record parsers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.beanio.internal.parser.StreamFormat
createMarshallingContext, createUnmarshallingContext
 

Constructor Detail

StreamFormatSupport

public StreamFormatSupport()
Constructs a new StreamFormatSupport.

Method Detail

setName

public void setName(String name)
Sets the name of this stream.

Parameters:
name - the stream name

getName

public String getName()
Description copied from interface: StreamFormat
Returns the name of the stream.

Specified by:
getName in interface StreamFormat
Returns:
the stream name

createRecordReader

public RecordReader createRecordReader(Reader in)
Creates a new RecordReader to read from the given input stream. This method delegates to the configured record parser factory.

Specified by:
createRecordReader in interface StreamFormat
Parameters:
in - the input stream to read from
Returns:
a new RecordReader

createRecordWriter

public RecordWriter createRecordWriter(Writer out)
Creates a new RecordWriter for writing to the given output stream. This method delegates to the configured record parser factory.

Specified by:
createRecordWriter in interface StreamFormat
Parameters:
out - the output stream to write to
Returns:
a new RecordWriter

createRecordMarshaller

public RecordMarshaller createRecordMarshaller()
Description copied from interface: StreamFormat
Creates a new record marshaller.

Specified by:
createRecordMarshaller in interface StreamFormat
Returns:
the new RecordMarshaller

createRecordUnmarshaller

public RecordUnmarshaller createRecordUnmarshaller()
Description copied from interface: StreamFormat
Creates a new record unmarshaller.

Specified by:
createRecordUnmarshaller in interface StreamFormat
Returns:
the new RecordUnmarshaller

setRecordParserFactory

public void setRecordParserFactory(RecordParserFactory recordParserFactory)
Sets the RecordParserFactory for creating record parsers.

Parameters:
recordParserFactory - the RecordParserFactory

getRecordParserFactory

protected RecordParserFactory getRecordParserFactory()
Returns the RecordParserFactory used by this stream.

Returns:
the RecordParserFactory

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim