Class ByteArrayElasticRawDeserializer

java.lang.Object
org.springframework.integration.ip.tcp.serializer.ByteArrayElasticRawDeserializer
All Implemented Interfaces:
org.springframework.core.serializer.Deserializer<byte[]>

public class ByteArrayElasticRawDeserializer
extends java.lang.Object
implements org.springframework.core.serializer.Deserializer<byte[]>
A deserializer that uses a ByteArrayOutputStream instead of a fixed buffer, allowing the buffer to grow as needed. Completion is indicated by the sender closing the socket.
Since:
5.0
  • Constructor Summary

    Constructors 
    Constructor Description
    ByteArrayElasticRawDeserializer()
    Construct an instance that uses ByteArrayOutputStreams with an initial buffer size of 32;
    ByteArrayElasticRawDeserializer​(int initialBufferSize)
    Construct an instance that uses ByteArrayOutputStreams with the provided initial buffer size.
  • Method Summary

    Modifier and Type Method Description
    byte[] deserialize​(java.io.InputStream inputStream)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.core.serializer.Deserializer

    deserializeFromByteArray
  • Constructor Details

    • ByteArrayElasticRawDeserializer

      public ByteArrayElasticRawDeserializer()
      Construct an instance that uses ByteArrayOutputStreams with an initial buffer size of 32;
    • ByteArrayElasticRawDeserializer

      public ByteArrayElasticRawDeserializer​(int initialBufferSize)
      Construct an instance that uses ByteArrayOutputStreams with the provided initial buffer size.
      Parameters:
      initialBufferSize - the initial buffer size.
  • Method Details

    • deserialize

      public byte[] deserialize​(java.io.InputStream inputStream) throws java.io.IOException
      Specified by:
      deserialize in interface org.springframework.core.serializer.Deserializer<byte[]>
      Throws:
      java.io.IOException