public class NoOpByteArrayCoder extends CoderAdapter implements Decoder.Binary<byte[]>, Encoder.Binary<byte[]>
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 |
---|
NoOpByteArrayCoder() |
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(ByteBuffer bytes)
Decode the given bytes into an object of type T.
|
ByteBuffer |
encode(byte[] 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, init
public ByteBuffer encode(byte[] object) throws EncodeException
Encoder.Binary
encode
in interface Encoder.Binary<byte[]>
object
- the object being encoded.EncodeException
public boolean willDecode(ByteBuffer bytes)
Decoder.Binary
willDecode
in interface Decoder.Binary<byte[]>
bytes
- the bytes to be decoded.public byte[] decode(ByteBuffer bytes) throws DecodeException
Decoder.Binary
decode
in interface Decoder.Binary<byte[]>
bytes
- the bytes to be decoded.DecodeException
Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.