|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RecordParserFactory
Factory interface for creating record parsers.
The Java object bound to a record depends on the stream format. The following table shows the object used for each format:
Format | Record Type |
---|---|
Fixed Length | String |
CSV, Delimited | String[] |
XML | Document |
The following table shows the method invoked for a requested BeanIO interface.
Requests For | Invokes |
---|---|
BeanReader |
createReader(Reader) |
BeanWriter |
createWriter(Writer) |
Unmarshaller |
createUnmarshaller() |
Marshaller |
createMarshaller() |
A RecordParserFactory implementation must be thread safe (after all of its properties have been set).
RecordReader
,
RecordWriter
,
RecordMarshaller
,
RecordUnmarshaller
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. |
Method Detail |
---|
void init() throws IllegalArgumentException
IllegalArgumentException
- if the parser configuration is invalidRecordReader createReader(Reader in) throws IllegalArgumentException
in
- the input stream to read from
RecordReader
IllegalArgumentException
- if this factory is improperly configured
and a RecordReader
cannot be createdRecordWriter createWriter(Writer out) throws IllegalArgumentException
out
- the output stream to write to
RecordWriter
IllegalArgumentException
- if this factory is improperly configured
and a RecordWriter
cannot be createdRecordMarshaller createMarshaller() throws IllegalArgumentException
RecordMarshaller
IllegalArgumentException
- if this factory is improperly configured and
a RecordMarshaller
cannot be createdRecordUnmarshaller createUnmarshaller() throws IllegalArgumentException
RecordUnmarshaller
IllegalArgumentException
- if this factory is improperly configured and
a RecordUnmarshaller
cannot be created
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |