public class ObjectToStringTransformer extends AbstractPayloadTransformer<Object,String>
toString()
method. Unless the
payload is a byte[]
or char[]
. If the payload
is a byte[], it will be transformed to a String containing the
array's contents, using the charset
which, by default, is "UTF-8". If the payload is a char[], it will be
transformed to a String object with the array's contents.logger
Constructor and Description |
---|
ObjectToStringTransformer() |
ObjectToStringTransformer(String charset) |
Modifier and Type | Method and Description |
---|---|
protected String |
transformPayload(Object payload) |
doTransform
transform
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getComponentType, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
public ObjectToStringTransformer()
public ObjectToStringTransformer(String charset)
protected String transformPayload(Object payload) throws Exception
transformPayload
in class AbstractPayloadTransformer<Object,String>
Exception
Copyright © 2018. All rights reserved.