public class ByteArrayElasticRawDeserializer extends Object implements Deserializer<byte[]>
ByteArrayOutputStream
instead of a fixed buffer,
allowing the buffer to grow as needed. Completion is indicated by the sender closing
the socket.Constructor and Description |
---|
ByteArrayElasticRawDeserializer()
Construct an instance that uses
ByteArrayOutputStream s with an initial
buffer size of 32; |
ByteArrayElasticRawDeserializer(int initialBufferSize)
Construct an instance that uses
ByteArrayOutputStream s with the provided
initial buffer size. |
Modifier and Type | Method and Description |
---|---|
byte[] |
deserialize(InputStream inputStream) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserializeFromByteArray
public ByteArrayElasticRawDeserializer()
ByteArrayOutputStream
s with an initial
buffer size of 32;public ByteArrayElasticRawDeserializer(int initialBufferSize)
ByteArrayOutputStream
s with the provided
initial buffer size.initialBufferSize
- the initial buffer size.public byte[] deserialize(InputStream inputStream) throws IOException
deserialize
in interface Deserializer<byte[]>
IOException