public class DecodeException
extends java.lang.Exception
Constructor and Description |
---|
DecodeException(java.nio.ByteBuffer bb,
java.lang.String message)
Constructs a DecodedException with the given ByteBuffer that cannot be decoded, and reason why.
|
DecodeException(java.nio.ByteBuffer bb,
java.lang.String message,
java.lang.Throwable cause)
Constructor with the binary data that could not be decoded, and the reason why it failed to be, and the cause.
|
DecodeException(java.lang.String encodedString,
java.lang.String message)
Constructs a DecodedException with the given encoded string that cannot be decoded, and reason why.
|
DecodeException(java.lang.String encodedString,
java.lang.String message,
java.lang.Throwable cause)
Constructor with the text data that could not be decoded, and the reason why it failed to be, and the cause.
|
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getBytes()
Return the ByteBuffer containing either the whole message, or the partial message, that could not be decoded, or
null if this exception arose from a failure to decode a text message. |
java.lang.String |
getText()
Return the encoded string that is either the whole message, or the partial message that could not be decoded, or
null if this exception arose from a failure to decode a binary message.. |
public DecodeException(java.nio.ByteBuffer bb, java.lang.String message, java.lang.Throwable cause)
bb
- the byte buffer containing the (part of) the message that could not be decoded.message
- the reason for the failure.cause
- the cause of the error.public DecodeException(java.lang.String encodedString, java.lang.String message, java.lang.Throwable cause)
encodedString
- the string representing the (part of) the message that could not be decoded.message
- the reason for the failure.cause
- the cause of the error.public DecodeException(java.nio.ByteBuffer bb, java.lang.String message)
bb
- the byte buffer containing the (part of) the message that could not be decoded.message
- the reason for the failure.public DecodeException(java.lang.String encodedString, java.lang.String message)
encodedString
- the string representing the (part of) the message that could not be decoded.message
- the reason for the failure.public java.nio.ByteBuffer getBytes()
null
if this exception arose from a failure to decode a text message.null
for text message failures.public java.lang.String getText()
null
if this exception arose from a failure to decode a binary message..null
for binary message failures.