public class NoOpByteBufferCoder extends CoderAdapter implements Decoder.Binary<ByteBuffer>, Encoder.Binary<ByteBuffer>
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>Encoder.Binary<T>, Encoder.BinaryStream<T>, Encoder.Text<T>, Encoder.TextStream<T>| Constructor and Description |
|---|
NoOpByteBufferCoder() |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
decode(ByteBuffer bytes)
Decode the given bytes into an object of type T.
|
ByteBuffer |
encode(ByteBuffer object)
Encode the given object into a byte array.
|
boolean |
willDecode(ByteBuffer bytes)
Answer whether the given bytes can be decoded into an object of type T.
|
destroy, initpublic boolean willDecode(ByteBuffer bytes)
Decoder.BinarywillDecode in interface Decoder.Binary<ByteBuffer>bytes - the bytes to be decoded.public ByteBuffer decode(ByteBuffer bytes) throws DecodeException
Decoder.Binarydecode in interface Decoder.Binary<ByteBuffer>bytes - the bytes to be decoded.DecodeException - If the provided bytes cannot be decoded to type Tpublic ByteBuffer encode(ByteBuffer object) throws EncodeException
Encoder.Binaryencode in interface Encoder.Binary<ByteBuffer>object - the object being encoded.EncodeException - The provided object could not be encoded to a byte bufferCopyright © 2012–2019 Oracle Corporation. All rights reserved.