public class ByteArrayStxEtxSerializer extends AbstractByteArraySerializer
Modifier and Type | Field and Description |
---|---|
static int |
ETX |
static int |
STX |
logger, maxMessageSize
Constructor and Description |
---|
ByteArrayStxEtxSerializer() |
Modifier and Type | Method and Description |
---|---|
byte[] |
deserialize(java.io.InputStream inputStream)
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.
|
checkClosure, copyToSizedArray, getMaxMessageSize, setMaxMessageSize
public static final int STX
public static final int ETX
public byte[] deserialize(java.io.InputStream inputStream) 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).java.io.IOException
public void serialize(byte[] bytes, java.io.OutputStream outputStream) throws java.io.IOException
java.io.IOException