org.mule.providers.file.transformers
Class FileToString
java.lang.Object
org.mule.transformers.AbstractTransformer
org.mule.providers.file.transformers.FileToByteArray
org.mule.providers.file.transformers.FileToString
- All Implemented Interfaces:
- Cloneable, Initialisable, UMOBaseTransformer, UMOTransformer
- public class FileToString
- extends FileToByteArray
FileToString
reads file contents into a string.
Method Summary |
Object |
doTransform(Object src,
String encoding)
Simple implementation which relies on FileToByteArray to get a
byte[] from the file beeing parsed and then transform it to a
String with the correct encoding. |
Methods inherited from class org.mule.transformers.AbstractTransformer |
checkReturnClass, clone, generateTransformerName, getEndpoint, getFinalReturnClass, getName, getNextTransformer, getReturnClass, initialise, isAcceptNull, isIgnoreBadInput, isSourceTypeSupported, isSourceTypeSupported, nextTransform, registerSourceType, setEndpoint, setIgnoreBadInput, setName, setNextTransformer, setReturnClass, toString, transform, unregisterSourceType |
FileToString
public FileToString()
doTransform
public Object doTransform(Object src,
String encoding)
throws TransformerException
- Simple implementation which relies on
FileToByteArray
to get a
byte[]
from the file beeing parsed and then transform it to a
String with the correct encoding. If the encoding isn't supported simply throw
an exception, good tranformation or no transformation at all. NOTE: if a
byte[]
is passed in as a source object this transformer accepts
it and tries the usual transformation.
- Overrides:
doTransform
in class FileToByteArray
- Throws:
TransformerException
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.