Decoder.Text (WebSocket 2.1 API Documentation - Apache Tomcat 10.1.57)
Description: declaration: package: jakarta.websocket, interface: Decoder, interface: Text

# Interface Decoder.Text<T>

Type Parameters:
  `T` - The type of object produced by the decoder

All Superinterfaces:
  `Decoder`

Enclosing interface:
  `Decoder`

public static interface Decoder.Text<T> extends Decoder
A decoder that decodes entire text WebSocket messages into an object of type T.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Decoder

  `Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `decode(String s)`
  Decodes the text data into an object.
  `boolean`
  `willDecode(String s)`
  Determines whether this decoder can decode the given text data.

  ### Methods inherited from interface Decoder

  `destroy, init`

- ## Method Details

  - ### decode

    T decode(String s) throws DecodeException
    Decodes the text data into an object.
    Parameters:
      `s` - The text data to decode
    Returns:
      The decoded object
    Throws:
      `DecodeException` - If the data cannot be decoded

  - ### willDecode

    boolean willDecode(String s)
    Determines whether this decoder can decode the given text data.
    Parameters:
      `s` - The text data to check
    Returns:
      `true` if this decoder can decode the data