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