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(InputStream inputStream)
Reads the data in the inputstream to a byte[].
|
void |
serialize(byte[] bytes,
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(InputStream inputStream) throws IOException
SoftEndOfStreamException
if the stream
is closed immediately before the STX (i.e. no data is in the process of
being read).IOException
public void serialize(byte[] bytes, OutputStream outputStream) throws IOException
IOException