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
ByteArrayOutputStreams with an initial
buffer size of 32; |
ByteArrayElasticRawDeserializer(int initialBufferSize)
Construct an instance that uses
ByteArrayOutputStreams 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, waitdeserializeFromByteArraypublic ByteArrayElasticRawDeserializer()
ByteArrayOutputStreams with an initial
buffer size of 32;public ByteArrayElasticRawDeserializer(int initialBufferSize)
ByteArrayOutputStreams with the provided
initial buffer size.initialBufferSize - the initial buffer size.public byte[] deserialize(InputStream inputStream) throws IOException
deserialize in interface Deserializer<byte[]>IOException