org.springframework.integration.ip.tcp.serializer
Class ByteArrayRawSerializer

java.lang.Object
  extended by org.springframework.integration.ip.tcp.serializer.AbstractByteArraySerializer
      extended by org.springframework.integration.ip.tcp.serializer.ByteArrayRawSerializer
All Implemented Interfaces:
Deserializer<byte[]>, Serializer<byte[]>

public class ByteArrayRawSerializer
extends AbstractByteArraySerializer

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.

Since:
2.0.3

Field Summary
 
Fields inherited from class org.springframework.integration.ip.tcp.serializer.AbstractByteArraySerializer
logger, maxMessageSize
 
Constructor Summary
ByteArrayRawSerializer()
           
 
Method Summary
 byte[] deserialize(java.io.InputStream inputStream)
           
 void serialize(byte[] bytes, java.io.OutputStream outputStream)
           
 
Methods inherited from class org.springframework.integration.ip.tcp.serializer.AbstractByteArraySerializer
checkClosure, getMaxMessageSize, setMaxMessageSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayRawSerializer

public ByteArrayRawSerializer()
Method Detail

serialize

public void serialize(byte[] bytes,
                      java.io.OutputStream outputStream)
               throws java.io.IOException
Throws:
java.io.IOException

deserialize

public byte[] deserialize(java.io.InputStream inputStream)
                   throws java.io.IOException
Throws:
java.io.IOException