public final class BytesCoder extends Object implements Coder<byte[]>
Coder
which is used for an array of bytes.Coder.DummyCoder
DUMMY_CODER
Constructor and Description |
---|
BytesCoder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(InputStream inStream)
Decodes the a value from the given input stream.
|
void |
encode(byte[] value,
OutputStream outStream)
Encodes the given value onto the specified output stream.
|
public void encode(byte[] value, OutputStream outStream) throws IOException
Coder
encode
in interface Coder<byte[]>
value
- the element to be encodedoutStream
- the stream on which encoded bytes are writtenIOException
- if fail to encodepublic byte[] decode(InputStream inStream) throws IOException
Coder
decode
in interface Coder<byte[]>
inStream
- the stream from which bytes are readIOException
- if fail to decodeCopyright © 2018. All rights reserved.