public class StreamBuilder extends GroupBuilderSupport<StreamBuilder>
Modifier and Type | Field and Description |
---|---|
protected StreamConfig |
config |
Constructor and Description |
---|
StreamBuilder(String name)
Constructs a new StreamBuilder.
|
StreamBuilder(String name,
String format)
Constructs a new StreamBuilder.
|
Modifier and Type | Method and Description |
---|---|
StreamBuilder |
addTypeHandler(Class<?> type,
TypeHandler handler)
Adds a type handler
|
StreamBuilder |
addTypeHandler(String name,
Class<?> type,
TypeHandler handler)
Adds a type handler
|
StreamBuilder |
addTypeHandler(String name,
TypeHandler handler)
Adds a type handler
|
StreamConfig |
build()
Builds the stream configuration.
|
StreamBuilder |
collection(Class<?> type)
Not supported.
|
StreamBuilder |
format(String format)
Sets the stream format.
|
protected GroupConfig |
getConfig()
Returns the configuration settings.
|
StreamBuilder |
ignoreUnidentifiedRecords()
Indicates unidentified records should be ignored during unmarshalling.
|
protected StreamBuilder |
me()
Returns this.
|
StreamBuilder |
parser(ParserBuilder parser)
Sets the parser for this stream.
|
StreamBuilder |
parser(RecordParserFactory parser)
Sets the parser for this stream.
|
StreamBuilder |
readOnly()
Indicates this stream configuration is only used for unmarshalling.
|
StreamBuilder |
resourceBundle(String name) |
StreamBuilder |
strict()
Indicates this stream should be strictly validated.
|
StreamBuilder |
type(Class<?> type)
Not supported.
|
StreamBuilder |
writeOnly()
Indicates this stream configuration is only used for marshalling.
|
addGroup, addGroup, addRecord, addRecord
protected StreamConfig config
public StreamBuilder(String name)
name
- the stream nameprotected StreamBuilder me()
PropertyBuilderSupport
me
in class PropertyBuilderSupport<StreamBuilder>
protected GroupConfig getConfig()
PropertyBuilderSupport
getConfig
in class GroupBuilderSupport<StreamBuilder>
public StreamBuilder format(String format)
format
- the format (e.g. csv, delimited, fixedlength, xml)public StreamBuilder parser(RecordParserFactory parser)
parser
- the stream parser factorypublic StreamBuilder parser(ParserBuilder parser)
parser
- the ParserBuilder
public StreamBuilder addTypeHandler(String name, Class<?> type, TypeHandler handler)
name
- the name of the type handlertype
- the class parsed by the type handlerhandler
- the type handlerpublic StreamBuilder addTypeHandler(String name, TypeHandler handler)
name
- the name of the type handlerhandler
- the type handlerpublic StreamBuilder addTypeHandler(Class<?> type, TypeHandler handler)
type
- the class parsed by the type handlerhandler
- the type handlerpublic StreamBuilder type(Class<?> type)
type
in class PropertyBuilderSupport<StreamBuilder>
type
- the classpublic StreamBuilder collection(Class<?> type)
collection
in class PropertyBuilderSupport<StreamBuilder>
type
- the Collection
or Map
class or subclasspublic StreamBuilder readOnly()
public StreamBuilder writeOnly()
public StreamBuilder resourceBundle(String name)
public StreamBuilder strict()
public StreamBuilder ignoreUnidentifiedRecords()
public StreamConfig build()