org.glassfish.tyrus
Class NoOpBinaryCoder
java.lang.Object
org.glassfish.tyrus.NoOpBinaryCoder
- All Implemented Interfaces:
- Decoder, Decoder.Binary<ByteBuffer>, Encoder, Encoder.Binary<ByteBuffer>
public class NoOpBinaryCoder
- extends Object
- implements Decoder.Binary<ByteBuffer>, Encoder.Binary<ByteBuffer>
- Author:
- Stepan Kopriva (stepan.kopriva at oracle.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final NoOpBinaryCoder INSTANCE
NoOpBinaryCoder
public NoOpBinaryCoder()
willDecode
public boolean willDecode(ByteBuffer bytes)
- Description copied from interface:
Decoder.Binary
- Answer whether the given bytes can be decoded into an object of type T.
- Specified by:
willDecode in interface Decoder.Binary<ByteBuffer>
- Parameters:
bytes - the bytes to be decoded.
- Returns:
- whether or not the bytes can be decoded by this decoder.
decode
public ByteBuffer decode(ByteBuffer bytes)
throws DecodeException
- Description copied from interface:
Decoder.Binary
- Decode the given bytes into an object of type T.
- Specified by:
decode in interface Decoder.Binary<ByteBuffer>
- Parameters:
bytes - the bytes to be decoded.
- Returns:
- the decoded object
- Throws:
DecodeException
encode
public ByteBuffer encode(ByteBuffer object)
throws EncodeException
- Description copied from interface:
Encoder.Binary
- Encode the given object into a byte array.
- Specified by:
encode in interface Encoder.Binary<ByteBuffer>
- Parameters:
object - the object being encoded
- Returns:
- the binary data
- Throws:
EncodeException
Copyright © 2012. All Rights Reserved.