org.springframework.integration.file.transformer
Class AbstractFilePayloadTransformer<T>
java.lang.Object
org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<T>
- All Implemented Interfaces:
- org.springframework.integration.transformer.Transformer
- Direct Known Subclasses:
- FileToByteArrayTransformer, FileToStringTransformer
public abstract class AbstractFilePayloadTransformer<T>
- extends java.lang.Object
- implements org.springframework.integration.transformer.Transformer
Base class for transformers that convert a File payload.
|
Method Summary |
void |
setDeleteFiles(boolean deleteFiles)
Specify whether to delete the File after transformation. |
org.springframework.integration.Message<?> |
transform(org.springframework.integration.Message<?> message)
|
protected abstract T |
transformFile(java.io.File file)
Subclasses must implement this method to transform the File contents. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractFilePayloadTransformer
public AbstractFilePayloadTransformer()
setDeleteFiles
public void setDeleteFiles(boolean deleteFiles)
- Specify whether to delete the File after transformation.
Default is false.
transform
public final org.springframework.integration.Message<?> transform(org.springframework.integration.Message<?> message)
- Specified by:
transform in interface org.springframework.integration.transformer.Transformer
transformFile
protected abstract T transformFile(java.io.File file)
throws java.lang.Exception
- Subclasses must implement this method to transform the File contents.
- Throws:
java.lang.Exception