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

public Class NoOpTextCoder

extends CoderAdapter
implements Decoder.Text<String>, Encoder.Text<String>
Class Inheritance
All Implemented Interfaces
jakarta.websocket.Encoder.Text, jakarta.websocket.Encoder, jakarta.websocket.Decoder.Text, jakarta.websocket.Decoder
Imports
jakarta.websocket.DecodeException, .Decoder, .EncodeException, .Encoder

Author
Stepan Kopriva

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Implements jakarta.websocket.Decoder.Text.decode.

Decode the given String into an object of type T.

public String
encode(String
the object being encoded.
object
)

Implements jakarta.websocket.Encoder.Text.encode.

Encode the given object into a String.

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

NoOpTextCoderback to summary
public NoOpTextCoder()

Method Detail

decodeback to summary
public String 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:String

the decoded message as an object of type T

Annotations
@Override
Exceptions
DecodeException:
If the provided string cannot be decoded to type T
encodeback to summary
public String encode(String object) throws EncodeException

Implements jakarta.websocket.Encoder.Text.encode.

Doc from jakarta.websocket.Encoder.Text.encode.

Encode the given object into a String.

Parameters
object:String

the object being encoded.

Returns:String

the encoded object as a string.

Annotations
@Override
Exceptions
EncodeException:
The provided object could not be encoded as a string
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