org.springframework.integration.file.transformer
Class FileToStringTransformer
java.lang.Object
org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<String>
org.springframework.integration.file.transformer.FileToStringTransformer
- All Implemented Interfaces:
- Transformer
public class FileToStringTransformer
- extends AbstractFilePayloadTransformer<String>
A payload transformer that copies a File's contents to a String.
- Author:
- Mark Fisher
Method Summary |
void |
setCharset(String charset)
Set the charset name to use when copying the File to a String. |
protected String |
transformFile(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 |
FileToStringTransformer
public FileToStringTransformer()
setCharset
public void setCharset(String charset)
- Set the charset name to use when copying the File to a String.
transformFile
protected final String transformFile(File file)
throws Exception
- Description copied from class:
AbstractFilePayloadTransformer
- Subclasses must implement this method to transform the File contents.
- Specified by:
transformFile
in class AbstractFilePayloadTransformer<String>
- Throws:
Exception
Copyright © 2010. All Rights Reserved.