public class NoOpByteBufferCoder extends CoderAdapter implements Decoder.Binary<java.nio.ByteBuffer>, Encoder.Binary<java.nio.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 |
---|---|
java.nio.ByteBuffer |
decode(java.nio.ByteBuffer bytes)
Decode the given bytes into an object of type T.
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer object)
Encode the given object into a byte array.
|
boolean |
willDecode(java.nio.ByteBuffer bytes)
Answer whether the given bytes can be decoded into an object of type T.
|
destroy, init
public boolean willDecode(java.nio.ByteBuffer bytes)
Decoder.Binary
willDecode
in interface Decoder.Binary<java.nio.ByteBuffer>
bytes
- the bytes to be decoded.public java.nio.ByteBuffer decode(java.nio.ByteBuffer bytes) throws DecodeException
Decoder.Binary
decode
in interface Decoder.Binary<java.nio.ByteBuffer>
bytes
- the bytes to be decoded.DecodeException
- If the provided bytes cannot be decoded to type Tpublic java.nio.ByteBuffer encode(java.nio.ByteBuffer object) throws EncodeException
Encoder.Binary
encode
in interface Encoder.Binary<java.nio.ByteBuffer>
object
- the object being encoded.EncodeException
- The provided object could not be encoded to a byte bufferCopyright © 2012–2025 Oracle Corporation. All rights reserved.