public class ByteArrayCrLfSerializer extends AbstractPooledBufferByteArraySerializer
| Modifier and Type | Field and Description |
|---|---|
static ByteArrayCrLfSerializer |
INSTANCE
A single reusable instance.
|
DEFAULT_MAX_MESSAGE_SIZE, logger, maxMessageSize| Constructor and Description |
|---|
ByteArrayCrLfSerializer() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
doDeserialize(InputStream inputStream,
byte[] buffer)
Reads the data in the inputStream to a byte[].
|
int |
fillToCrLf(InputStream inputStream,
byte[] buffer) |
void |
serialize(byte[] bytes,
OutputStream outputStream)
Writes the byte[] to the stream and appends \r\n.
|
copyToSizedArray, deserialize, setPoolSize, setPoolWaitTimeoutcheckClosure, getMaxMessageSize, publishEvent, setApplicationEventPublisher, setMaxMessageSizepublic static final ByteArrayCrLfSerializer INSTANCE
public byte[] doDeserialize(InputStream inputStream, byte[] buffer) throws IOException
SoftEndOfStreamException if the stream
is closed immediately after the \r\n (i.e. no data is in the process of
being read).doDeserialize in class AbstractPooledBufferByteArraySerializerinputStream - the input stream.buffer - the raw working buffer (maxMessageSize).IOException - an io exception.public int fillToCrLf(InputStream inputStream, byte[] buffer) throws IOException
IOExceptionpublic void serialize(byte[] bytes,
OutputStream outputStream)
throws IOException
IOException