Class BindyFixedLengthDataFormat
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.dataformat.bindy.BindyAbstractDataFormat
-
- org.apache.camel.dataformat.bindy.fixed.BindyFixedLengthDataFormat
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.DataFormat
,org.apache.camel.spi.DataFormatName
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Dataformat("bindyFixed") public class BindyFixedLengthDataFormat extends BindyAbstractDataFormat
Marshal and unmarshal between POJOs and fixed field length format using Camel Bindy
-
-
Field Summary
Fields Modifier and Type Field Description static String
CAMEL_BINDY_FIXED_LENGTH_FOOTER
static String
CAMEL_BINDY_FIXED_LENGTH_HEADER
-
Constructor Summary
Constructors Constructor Description BindyFixedLengthDataFormat()
BindyFixedLengthDataFormat(Class<?> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>
createModel(BindyFixedLengthFactory factory, String line, int count)
protected BindyAbstractFactory
createModelFactory(FormatFactory formatFactory)
String
getDataFormatName()
void
marshal(org.apache.camel.Exchange exchange, Object body, OutputStream outputStream)
Object
unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream)
-
Methods inherited from class org.apache.camel.dataformat.bindy.BindyAbstractDataFormat
createLinkedFieldsModel, createLinkedFieldsModel, doStart, doStop, extractUnmarshalResult, getCamelContext, getClassType, getFactory, getLocale, isAllowEmptyStream, isUnwrapSingleInstance, setAllowEmptyStream, setCamelContext, setClassType, setLocale, setModelFactory, setUnwrapSingleInstance
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
CAMEL_BINDY_FIXED_LENGTH_HEADER
public static final String CAMEL_BINDY_FIXED_LENGTH_HEADER
- See Also:
- Constant Field Values
-
CAMEL_BINDY_FIXED_LENGTH_FOOTER
public static final String CAMEL_BINDY_FIXED_LENGTH_FOOTER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BindyFixedLengthDataFormat
public BindyFixedLengthDataFormat()
-
BindyFixedLengthDataFormat
public BindyFixedLengthDataFormat(Class<?> type)
-
-
Method Detail
-
getDataFormatName
public String getDataFormatName()
-
marshal
public void marshal(org.apache.camel.Exchange exchange, Object body, OutputStream outputStream) throws Exception
- Throws:
Exception
-
unmarshal
public Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream) throws Exception
- Throws:
Exception
-
createModel
protected Map<String,Object> createModel(BindyFixedLengthFactory factory, String line, int count) throws Exception
- Throws:
Exception
-
createModelFactory
protected BindyAbstractFactory createModelFactory(FormatFactory formatFactory) throws Exception
- Specified by:
createModelFactory
in classBindyAbstractDataFormat
- Throws:
Exception
-
-