Class FileToByteArrayTransformer
java.lang.Object
org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<byte[]>
org.springframework.integration.file.transformer.FileToByteArrayTransformer
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,GenericTransformer<Message<?>,
,Message<?>> Transformer
A payload transformer that copies a File's contents to a byte array.
- Author:
- Mark Fisher
-
Field Summary
Fields inherited from class org.springframework.integration.file.transformer.AbstractFilePayloadTransformer
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final byte[]
transformFile
(File file) Subclasses must implement this method to transform the File contents.Methods inherited from class org.springframework.integration.file.transformer.AbstractFilePayloadTransformer
getMessageBuilderFactory, setBeanFactory, setDeleteFiles, transform
-
Constructor Details
-
FileToByteArrayTransformer
public FileToByteArrayTransformer()
-
-
Method Details
-
transformFile
Description copied from class:AbstractFilePayloadTransformer
Subclasses must implement this method to transform the File contents.- Specified by:
transformFile
in classAbstractFilePayloadTransformer<byte[]>
- Parameters:
file
- The file.- Returns:
- The result of the transformation.
- Throws:
IOException
- Any IOException.
-