Reads data in an InputStream to a byte[]; data must be prefixed by <stx> and
terminated by <etx> (not included in resulting byte[]).
Writes a byte[] to an OutputStream prefixed by <stx> terminated by <etx>
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.
public byte[] deserialize(java.io.InputStream inputStream)
throws java.io.IOException
Reads the data in the inputstream to a byte[]. Data must be prefixed
with an ASCII STX character, and terminated with an ASCII ETX character.
Throws a SoftEndOfStreamException if the stream
is closed immediately before the STX (i.e. no data is in the process of
being read).
Throws:
java.io.IOException
serialize
public void serialize(byte[] bytes,
java.io.OutputStream outputStream)
throws java.io.IOException
Writes the byte[] to the stream, prefixed by an ASCII STX character and
terminated with an ASCII ETX character.