Class FileToStringTransformer
java.lang.Object
org.springframework.integration.file.transformer.AbstractFilePayloadTransformer<String>
org.springframework.integration.file.transformer.FileToStringTransformer
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- GenericTransformer<Message<?>, Message<?>>,- Transformer
A payload transformer that copies a File's contents to a String.
- Author:
- Mark Fisher, Gary Russell
- 
Field SummaryFields inherited from class org.springframework.integration.file.transformer.AbstractFilePayloadTransformerlogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidsetCharset(String charset) Set the charset name to use when copying the File to a String.protected final StringtransformFile(File file) Subclasses must implement this method to transform the File contents.Methods inherited from class org.springframework.integration.file.transformer.AbstractFilePayloadTransformergetMessageBuilderFactory, setBeanFactory, setDeleteFiles, transform
- 
Constructor Details- 
FileToStringTransformerpublic FileToStringTransformer()
 
- 
- 
Method Details- 
setCharsetSet the charset name to use when copying the File to a String.- Parameters:
- charset- The charset.
 
- 
transformFileDescription copied from class:AbstractFilePayloadTransformerSubclasses must implement this method to transform the File contents.- Specified by:
- transformFilein class- AbstractFilePayloadTransformer<String>
- Parameters:
- file- The file.
- Returns:
- The result of the transformation.
- Throws:
- IOException- Any IOException.
 
 
-