Class StreamTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.transformer.StreamTransformer
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- InitializingBean,- ApplicationContextAware,- ComponentSourceAware,- ExpressionCapable,- GenericTransformer<Message<?>,,- Message<?>> - NamedComponent,- Transformer
Transforms an InputStream payload to a byte[] or String (if a
 charset is provided).
- Since:
- 4.3
- Author:
- Gary Russell
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, logger
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct an instance to transform anInputStreamto abyte[].StreamTransformer(String charset) Construct an instance with the charset to convert the stream to a String; if null abyte[]will be produced instead.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectdoTransform(Message<?> message) Subclasses must implement this method to provide the transformation logic.Methods inherited from class org.springframework.integration.transformer.AbstractTransformertransformMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
- 
Constructor Details- 
StreamTransformerpublic StreamTransformer()Construct an instance to transform anInputStreamto abyte[].
- 
StreamTransformerConstruct an instance with the charset to convert the stream to a String; if null abyte[]will be produced instead.- Parameters:
- charset- the charset.
 
 
- 
- 
Method Details- 
doTransformDescription copied from class:AbstractTransformerSubclasses must implement this method to provide the transformation logic. If the return value is itself a Message, it will be used as the result. Otherwise, any non-null return value will be used as the payload of the result Message.- Specified by:
- doTransformin class- AbstractTransformer
- Parameters:
- message- The message.
- Returns:
- The result of the transformation.
 
 
-