public class ByteArrayStxEtxSerializer extends AbstractPooledBufferByteArraySerializer
| Modifier and Type | Field and Description |
|---|---|
static int |
ETX |
static ByteArrayStxEtxSerializer |
INSTANCE
A single reusable instance.
|
static int |
STX |
logger, maxMessageSize| Constructor and Description |
|---|
ByteArrayStxEtxSerializer() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
doDeserialize(java.io.InputStream inputStream,
byte[] buffer)
Reads the data in the inputStream to a byte[].
|
void |
serialize(byte[] bytes,
java.io.OutputStream outputStream)
Writes the byte[] to the stream, prefixed by an ASCII STX character and
terminated with an ASCII ETX character.
|
copyToSizedArray, deserialize, setPoolSize, setPoolWaitTimeoutcheckClosure, getMaxMessageSize, publishEvent, setApplicationEventPublisher, setMaxMessageSizepublic static final ByteArrayStxEtxSerializer INSTANCE
public static final int STX
public static final int ETX
public byte[] doDeserialize(java.io.InputStream inputStream,
byte[] buffer)
throws java.io.IOException
SoftEndOfStreamException if the stream
is closed immediately before the STX (i.e. no data is in the process of
being read).doDeserialize in class AbstractPooledBufferByteArraySerializerinputStream - the input stream.buffer - the raw working buffer (maxMessageSize).java.io.IOException - an io exception.public void serialize(byte[] bytes,
java.io.OutputStream outputStream)
throws java.io.IOException
java.io.IOException