Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.transport.file.transformers
Class FileToString

    java.lang.Object
      org.mule.transformer.AbstractTransformer
          org.mule.transformer.simple.SerializableToByteArray
              org.mule.transformer.simple.ObjectToByteArray
                  org.mule.transport.file.transformers.FileToByteArray
                      org.mule.transport.file.transformers.FileToString

All Implemented Interfaces:
  MuleContextAware, MuleContextNotificationListener<MuleContextNotification>, ServerNotificationListener<MuleContextNotification>, Disposable, Initialisable, NamedObject, MessageProcessor, DiscoverableTransformer, Transformer, EndpointAware

    public class FileToString

extends FileToByteArray

`FileToString` reads file contents into a string.

Field Summary

Fields inherited from class org.mule.transformer.AbstractTransformer
`encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes`

Fields inherited from interface org.mule.api.transformer.DiscoverableTransformer
`DEFAULT_PRIORITY_WEIGHTING, MAX_PRIORITY_WEIGHTING, MIN_PRIORITY_WEIGHTING`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`FileToString()`

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.transformer.simple.SerializableToByteArray
`getPriorityWeighting, isAcceptMuleMessage, setAcceptMuleMessage, setPriorityWeighting`

Methods inherited from class org.mule.transformer.AbstractTransformer
`checkReturnClass, dispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, onNotification, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FileToString

    public FileToString()

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.