org.springframework.integration.file.transformer
Class FileToStringTransformer

java.lang.Object
  extended by org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<java.lang.String>
      extended by org.springframework.integration.file.transformer.FileToStringTransformer
All Implemented Interfaces:
Transformer

public class FileToStringTransformer
extends AbstractFilePayloadTransformer<java.lang.String>

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


Constructor Summary
FileToStringTransformer()
           
 
Method Summary
 void setCharset(java.lang.String charset)
          Set the charset name to use when copying the File to a String.
protected  java.lang.String 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

FileToStringTransformer

public FileToStringTransformer()
Method Detail

setCharset

public void setCharset(java.lang.String charset)
Set the charset name to use when copying the File to a String.


transformFile

protected final java.lang.String 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<java.lang.String>
Throws:
java.lang.Exception