Class DecodeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.websocket.DecodeException
- All Implemented Interfaces:
Serializable
Exception thrown when a decoder fails to decode a WebSocket message.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDecodeException(String encodedString, String message) Creates a DecodeException for text data with the specified detail message.DecodeException(String encodedString, String message, Throwable cause) Creates a DecodeException for text data with the specified detail message and cause.DecodeException(ByteBuffer bb, String message) Creates a DecodeException for binary data with the specified detail message.DecodeException(ByteBuffer bb, String message, Throwable cause) Creates a DecodeException for binary data with the specified detail message and cause. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DecodeException
Creates a DecodeException for binary data with the specified detail message and cause.- Parameters:
bb- The binary data that could not be decodedmessage- The detail messagecause- The underlying cause of the exception
-
DecodeException
Creates a DecodeException for text data with the specified detail message and cause.- Parameters:
encodedString- The text data that could not be decodedmessage- The detail messagecause- The underlying cause of the exception
-
DecodeException
Creates a DecodeException for binary data with the specified detail message.- Parameters:
bb- The binary data that could not be decodedmessage- The detail message
-
DecodeException
-
-
Method Details
-
getBytes
Returns the binary data that could not be decoded.- Returns:
- The binary data, or
nullif the exception was for text data
-
getText
Returns the text data that could not be decoded.- Returns:
- The text data, or
nullif the exception was for binary data
-