public class FileToString extends FileToByteArray
FileToString
reads file contents into a string.encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
DEFAULT_PRIORITY_WEIGHTING, MAX_PRIORITY_WEIGHTING, MIN_PRIORITY_WEIGHTING
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
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, setPriorityWeighting
dispose, generateTransformerName, getAnnotation, getAnnotations, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setAnnotations, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform, transform
process
initialise
dispose
setName
getName
setMuleContext
setEndpoint
public Object doTransform(Object src, String encoding) throws 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 FileToByteArray
TransformerException
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.