public class ByteArraySingleTerminatorSerializer extends AbstractPooledBufferByteArraySerializer
DEFAULT_MAX_MESSAGE_SIZE, logger
Constructor and Description |
---|
ByteArraySingleTerminatorSerializer(byte delimiter) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
doDeserialize(InputStream inputStream,
byte[] buffer)
Reads the data in the inputStream to a byte[].
|
void |
serialize(byte[] bytes,
OutputStream outputStream)
Writes the byte[] to the stream and appends the terminator.
|
copyToSizedArray, deserialize, setPoolSize, setPoolWaitTimeout
checkClosure, getMaxMessageSize, publishEvent, setApplicationEventPublisher, setMaxMessageSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
serializeToByteArray
deserializeFromByteArray
public ByteArraySingleTerminatorSerializer(byte delimiter)
protected byte[] doDeserialize(InputStream inputStream, byte[] buffer) throws IOException
SoftEndOfStreamException
if the stream
is closed immediately after the terminator (i.e. no data is in the process of
being read).doDeserialize
in class AbstractPooledBufferByteArraySerializer
inputStream
- the input stream.buffer
- the raw working buffer (maxMessageSize).IOException
- an io exception.public void serialize(byte[] bytes, OutputStream outputStream) throws IOException
IOException