Class ConvertingBytesMessageMapper
java.lang.Object
org.springframework.integration.mapping.ConvertingBytesMessageMapper
- All Implemented Interfaces:
- BytesMessageMapper,- InboundMessageMapper<byte[]>,- OutboundMessageMapper<byte[]>
public class ConvertingBytesMessageMapper extends Object implements BytesMessageMapper
The 
BytesMessageMapper implementation to delegate to/from Message
 conversion into the provided MessageConverter.
 
 The MessageConverter must not return null from its
 MessageConverter.fromMessage(Message, Class) and MessageConverter.toMessage(Object, MessageHeaders)
 methods.
 
 If MessageConverter.fromMessage(Message, Class) returns String, it is converted to byte[]
 using a StandardCharsets.UTF_8 encoding.
- Since:
- 5.4
- Author:
- Artem Bilan
- 
Constructor SummaryConstructors Constructor Description ConvertingBytesMessageMapper(MessageConverter messageConverter)
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.mapping.BytesMessageMappertoMessage
- 
Constructor Details
- 
Method Details- 
toMessageDescription copied from interface:InboundMessageMapperConvert a provided object to theMessageand supply with headers if necessary and provided.- Specified by:
- toMessagein interface- BytesMessageMapper
- Specified by:
- toMessagein interface- InboundMessageMapper<byte[]>
- Parameters:
- bytes- the object for message payload or some other conversion logic
- headers- additional headers for building message. Can be null
- Returns:
- the message as a result of mapping
 
- 
fromMessage- Specified by:
- fromMessagein interface- OutboundMessageMapper<byte[]>
 
 
-