public abstract class AbstractPooledBufferByteArraySerializer extends AbstractByteArraySerializer
logger, maxMessageSize| Constructor and Description |
|---|
AbstractPooledBufferByteArraySerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
copyToSizedArray(byte[] buffer,
int size)
Copy size bytes to a new buffer exactly size bytes long.
|
byte[] |
deserialize(java.io.InputStream inputStream) |
protected abstract byte[] |
doDeserialize(java.io.InputStream inputStream,
byte[] buffer) |
void |
setPoolSize(int size)
Set the pool size for deserialization buffers.
|
void |
setPoolWaitTimeout(long poolWaitTimeout)
Set the pool wait timeout if a pool is configured, default unlimited.
|
checkClosure, getMaxMessageSize, publishEvent, setApplicationEventPublisher, setMaxMessageSizepublic AbstractPooledBufferByteArraySerializer()
public void setPoolSize(int size)
size - the size, -1 for unlimited.public void setPoolWaitTimeout(long poolWaitTimeout)
poolWaitTimeout - the timeout.public final byte[] deserialize(java.io.InputStream inputStream)
throws java.io.IOException
java.io.IOExceptionprotected abstract byte[] doDeserialize(java.io.InputStream inputStream,
byte[] buffer)
throws java.io.IOException
inputStream - the input stream.buffer - the raw working buffer (maxMessageSize).java.io.IOException - an io exception.protected byte[] copyToSizedArray(byte[] buffer,
int size)
buffer - The buffer containing the data.size - The number of bytes to copy.