Package javax.websocket
Interface Decoder.Binary<T>
- All Superinterfaces:
Decoder
- Enclosing interface:
- Decoder
This interface defines how a custom object (of type T) is decoded from a web socket message in
the form of a byte buffer.
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.websocket.Decoder
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(ByteBuffer bytes) Decode the given bytes into an object of type T.boolean
willDecode
(ByteBuffer bytes) Answer whether the given bytes can be decoded into an object of type T.
-
Method Details
-
decode
Decode the given bytes into an object of type T.- Parameters:
bytes
- the bytes to be decoded.- Returns:
- the decoded object.
- Throws:
DecodeException
-
willDecode
Answer whether the given bytes can be decoded into an object of type T.- Parameters:
bytes
- the bytes to be decoded.- Returns:
- whether or not the bytes can be decoded by this decoder.
-