Example usage for org.springframework.integration.ip.tcp.connection TcpMessageMapper setStringToBytes

List of usage examples for org.springframework.integration.ip.tcp.connection TcpMessageMapper setStringToBytes

Introduction

In this page you can find the example usage for org.springframework.integration.ip.tcp.connection TcpMessageMapper setStringToBytes.

Prototype

public void setStringToBytes(boolean stringToBytes) 

Source Link

Document

Sets whether outbound String payloads are to be converted to byte[].

Usage

From source file:org.springframework.integration.ip.tcp.connection.AbstractTcpConnection.java

/**
 * @param mapper the mapper to set//from w w  w .  j a v  a2 s.c o  m
 */
public void setMapper(TcpMessageMapper mapper) {
    Assert.notNull(mapper, this.getClass().getName() + " Mapper may not be null");
    this.mapper = mapper;
    if (this.serializer != null && !(this.serializer instanceof AbstractByteArraySerializer)) {
        mapper.setStringToBytes(false);
    }
}