public class ByteArraySingleTerminatorSerializer extends AbstractByteArraySerializer
logger, maxMessageSize
Constructor and Description |
---|
ByteArraySingleTerminatorSerializer(byte delimiter) |
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 and appends the terminator.
|
checkClosure, copyToSizedArray, getMaxMessageSize, setMaxMessageSize
public ByteArraySingleTerminatorSerializer(byte delimiter)
public byte[] deserialize(InputStream inputStream) throws IOException
SoftEndOfStreamException
if the stream
is closed immediately after the terminator (i.e. no data is in the process of
being read).IOException
public void serialize(byte[] bytes, OutputStream outputStream) throws IOException
IOException