Class ByteArrayRawSerializer

All Implemented Interfaces:
Aware, ApplicationEventPublisherAware, Deserializer<byte[]>, Serializer<byte[]>

public class ByteArrayRawSerializer
extends AbstractPooledBufferByteArraySerializer
A byte array (de)serializer that does nothing with the payload; sends it raw. Message termination for assembly purposes is signaled by the client closing the connection. The serializer does not, itself, close the connection after writing the bytes.

Because the socket must be closed to indicate message end, this (de)serializer can only be used by uni-directional (non-collaborating) channel adapters, and not by gateways.

Prior to 4.2.2, when using NIO, a timeout caused whatever had been partially received to be emitted as a message.

Now, a SocketTimeoutException is thrown. To revert to the previous behavior, set the treatTimeoutAsEndOfMessage constructor argument to true.

Gary Russell, Artem Bilan