Package jakarta.websocket
Interface Encoder.Binary<T>
- Type Parameters:
T
- The type of the custom object that this Encoder can encoder to a ByteBuffer.
- All Superinterfaces:
Encoder
- All Known Implementing Classes:
NoOpByteArrayCoder
,NoOpByteBufferCoder
- Enclosing interface:
Encoder
This interface defines how to provide a way to convert a custom object into a binary message.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.websocket.Encoder
Encoder.Binary<T>, Encoder.BinaryStream<T>, Encoder.Text<T>, Encoder.TextStream<T>
-
Method Summary
Modifier and TypeMethodDescriptionEncode the given object into a byte array.
-
Method Details
-
encode
Encode the given object into a byte array.- Parameters:
object
- the object being encoded.- Returns:
- the binary data.
- Throws:
EncodeException
- The provided object could not be encoded to a byte buffer
-