org.springframework.integration.file.transformer
Class AbstractFilePayloadTransformer<T>

java.lang.Object
  extended by org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<T>
All Implemented Interfaces:
Transformer
Direct Known Subclasses:
FileToByteArrayTransformer, FileToStringTransformer

public abstract class AbstractFilePayloadTransformer<T>
extends java.lang.Object
implements Transformer

Base class for transformers that convert a File payload.


Constructor Summary
AbstractFilePayloadTransformer()
           
 
Method Summary
 void setDeleteFiles(boolean deleteFiles)
          Specify whether to delete the File after transformation.
 Message<?> transform(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
 

Constructor Detail

AbstractFilePayloadTransformer

public AbstractFilePayloadTransformer()
Method Detail

setDeleteFiles

public void setDeleteFiles(boolean deleteFiles)
Specify whether to delete the File after transformation. Default is false.


transform

public final Message<?> transform(Message<?> message)
Specified by:
transform in interface 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