| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | decode(ByteBuffer
the bytes to be decoded. bytes)Implements jakarta. Decode the given bytes into an object of type T. |
| public ByteBuffer | encode(byte[]
the object being encoded. object)Implements jakarta. Encode the given object into a byte array. |
| public boolean | willDecode(ByteBuffer
the bytes to be decoded. bytes)Implements jakarta. Answer whether the given bytes can be decoded into an object of type T. |
| NoOpByteArrayCoder | back to summary |
|---|---|
| public NoOpByteArrayCoder() | |
| decode | back to summary |
|---|---|
| public byte[] decode(ByteBuffer bytes) throws DecodeException Implements jakarta. Doc from jakarta. Decode the given bytes into an object of type T. It is not safe for other threads to use the ByteBuffer until the decoding of the given bytes is complete. If the decoding completes successfully, the buffer's limit will be unchanged and the buffer's position will be equal to the limit. If the decoding does not complete successfully, the state of the buffer is undefined.
| |
| encode | back to summary |
|---|---|
| public ByteBuffer encode(byte[] object) throws EncodeException Implements jakarta. Doc from jakarta. Encode the given object into a byte array.
| |
| willDecode | back to summary |
|---|---|
| public boolean willDecode(ByteBuffer bytes) Implements jakarta. Doc from jakarta. Answer whether the given bytes can be decoded into an object of type T. It is not safe for other threads to use the ByteBuffer until this method completes. When the method completes, the buffer will be in the same state as it was at the start of the method call.
| |