public class ByteArrayCrLfSerializer extends AbstractByteArraySerializer
logger, maxMessageSize
Constructor and Description |
---|
ByteArrayCrLfSerializer() |
Modifier and Type | Method and Description |
---|---|
byte[] |
deserialize(InputStream inputStream)
Reads the data in the inputstream to a byte[].
|
int |
fillToCrLf(InputStream inputStream,
byte[] buffer) |
void |
serialize(byte[] bytes,
OutputStream outputStream)
Writes the byte[] to the stream and appends \r\n.
|
checkClosure, copyToSizedArray, getMaxMessageSize, setMaxMessageSize
public byte[] deserialize(InputStream inputStream) throws IOException
SoftEndOfStreamException
if the stream
is closed immediately after the \r\n (i.e. no data is in the process of
being read).IOException
public int fillToCrLf(InputStream inputStream, byte[] buffer) throws IOException, SoftEndOfStreamException
IOException
SoftEndOfStreamException
public void serialize(byte[] bytes, OutputStream outputStream) throws IOException
IOException