Class BeanioDataFormat
java.lang.Object
org.apache.camel.model.IdentifiedType
org.apache.camel.model.DataFormatDefinition
org.apache.camel.model.dataformat.BeanioDataFormat
@Metadata(firstVersion="2.10.0",
label="dataformat,transformation,csv",
title="BeanIO")
public class BeanioDataFormat
extends DataFormatDefinition
Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length formats).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder
is a specific builder forBeanioDataFormat
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setBeanReaderErrorHandlerType
(String beanReaderErrorHandlerType) To use a custom org.apache.camel.dataformat.beanio.BeanIOErrorHandler as error handler while parsing.void
setEncoding
(String encoding) The charset to use.void
setIgnoreInvalidRecords
(String ignoreInvalidRecords) Whether to ignore invalid records.void
setIgnoreUnexpectedRecords
(String ignoreUnexpectedRecords) Whether to ignore unexpected records.void
setIgnoreUnidentifiedRecords
(String ignoreUnidentifiedRecords) Whether to ignore unidentified records.void
setMapping
(String mapping) The BeanIO mapping file.void
setStreamName
(String streamName) The name of the stream to use.void
setUnmarshalSingleObject
(String unmarshalSingleObject) This options controls whether to unmarshal as a list of objects or as a single object only.Methods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getDataFormatName, getShortName, setDataFormat, setDataFormatName
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
Constructor Details
-
BeanioDataFormat
public BeanioDataFormat()
-
-
Method Details
-
getMapping
-
setMapping
The BeanIO mapping file. Is by default loaded from the classpath. You can prefix with file:, http:, or classpath: to denote from where to load the mapping file. -
getStreamName
-
setStreamName
The name of the stream to use. -
getIgnoreUnidentifiedRecords
-
setIgnoreUnidentifiedRecords
Whether to ignore unidentified records. -
getIgnoreUnexpectedRecords
-
setIgnoreUnexpectedRecords
Whether to ignore unexpected records. -
getIgnoreInvalidRecords
-
setIgnoreInvalidRecords
Whether to ignore invalid records. -
getEncoding
-
setEncoding
The charset to use. Is by default the JVM platform default charset. -
getBeanReaderErrorHandlerType
-
setBeanReaderErrorHandlerType
To use a custom org.apache.camel.dataformat.beanio.BeanIOErrorHandler as error handler while parsing. Configure the fully qualified class name of the error handler. Notice the options ignoreUnidentifiedRecords, ignoreUnexpectedRecords, and ignoreInvalidRecords may not be in use when you use a custom error handler. -
getUnmarshalSingleObject
-
setUnmarshalSingleObject
This options controls whether to unmarshal as a list of objects or as a single object only. The former is the default mode, and the latter is only intended in special use-cases where beanio maps the Camel message to a single POJO bean.
-