Top Description Constructors Methods
org.glassfish.tyrus.core.coder

public Class ReaderDecoder

extends CoderAdapter
implements Decoder.Text<Reader>
Class Inheritance
All Implemented Interfaces
jakarta.websocket.Decoder.Text, jakarta.websocket.Decoder
Imports
java.io.Reader, .StringReader, jakarta.websocket.DecodeException, .Decoder

Built in Decoder for Reader.
Author
Pavel Bucek

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Reader
decode(String
string to be decoded.
s
)

Implements jakarta.websocket.Decoder.Text.decode.

Decode the given String into an object of type T.

public boolean
willDecode(String
the string being tested for decodability.
s
)

Implements jakarta.websocket.Decoder.Text.willDecode.

Answer whether the given String can be decoded into an object of type T.

Inherited from org.glassfish.tyrus.core.coder.CoderAdapter:
destroyinit

Constructor Detail

ReaderDecoderback to summary
public ReaderDecoder()

Method Detail

decodeback to summary
public Reader decode(String s) throws DecodeException

Implements jakarta.websocket.Decoder.Text.decode.

Doc from jakarta.websocket.Decoder.Text.decode.

Decode the given String into an object of type T.

Parameters
s:String

string to be decoded.

Returns:Reader

the decoded message as an object of type T

Annotations
@Override
Exceptions
DecodeException:
If the provided string cannot be decoded to type T
willDecodeback to summary
public boolean willDecode(String s)

Implements jakarta.websocket.Decoder.Text.willDecode.

Doc from jakarta.websocket.Decoder.Text.willDecode.

Answer whether the given String can be decoded into an object of type T.

Parameters
s:String

the string being tested for decodability.

Returns:boolean

whether this decoder can decoded the supplied string.

Annotations
@Override