Package org.glassfish.tyrus.core.coder
Class ReaderDecoder
java.lang.Object
org.glassfish.tyrus.core.coder.CoderAdapter
org.glassfish.tyrus.core.coder.ReaderDecoder
- All Implemented Interfaces:
Decoder
,Decoder.Text<Reader>
- Author:
- Pavel Bucek
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.websocket.Decoder
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDecode the given String into an object of type T.boolean
willDecode
(String s) Answer whether the given String can be decoded into an object of type T.Methods inherited from class org.glassfish.tyrus.core.coder.CoderAdapter
destroy, init
-
Constructor Details
-
ReaderDecoder
public ReaderDecoder()
-
-
Method Details
-
willDecode
Description copied from interface:Decoder.Text
Answer whether the given String can be decoded into an object of type T.- Specified by:
willDecode
in interfaceDecoder.Text<Reader>
- Parameters:
s
- the string being tested for decodability.- Returns:
- whether this decoder can decoded the supplied string.
-
decode
Description copied from interface:Decoder.Text
Decode the given String into an object of type T.- Specified by:
decode
in interfaceDecoder.Text<Reader>
- Parameters:
s
- string to be decoded.- Returns:
- the decoded message as an object of type T
- Throws:
DecodeException
- If the provided string cannot be decoded to type T
-