org.springframework.integration.file.transformer
Class FileToByteArrayTransformer

java.lang.Object
  extended by org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<byte[]>
      extended by org.springframework.integration.file.transformer.FileToByteArrayTransformer
All Implemented Interfaces:
Transformer

public class FileToByteArrayTransformer
extends AbstractFilePayloadTransformer<byte[]>

A payload transformer that copies a File's contents to a byte array.


Constructor Summary
FileToByteArrayTransformer()
           
 
Method Summary
protected  byte[] transformFile(java.io.File file)
          Subclasses must implement this method to transform the File contents.
 
Methods inherited from class org.springframework.integration.file.transformer.AbstractFilePayloadTransformer
setDeleteFiles, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileToByteArrayTransformer

public FileToByteArrayTransformer()
Method Detail

transformFile

protected final byte[] transformFile(java.io.File file)
                              throws java.lang.Exception
Description copied from class: AbstractFilePayloadTransformer
Subclasses must implement this method to transform the File contents.

Specified by:
transformFile in class AbstractFilePayloadTransformer<byte[]>
Throws:
java.lang.Exception