public class FileToString extends FileToByteArray
FileToString reads file contents into a string.encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes| Constructor and Description |
|---|
FileToString() |
| Modifier and Type | Method and Description |
|---|---|
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. |
getPriorityWeighting, setPriorityWeightingdispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceTypegetAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform, transformpublic Object doTransform(Object src, String encoding) throws org.mule.api.transformer.TransformerException
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.doTransform in class FileToByteArrayorg.mule.api.transformer.TransformerExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.