public class DecodeException extends Exception
Constructor and Description |
---|
DecodeException(ByteBuffer bb,
String message)
Constructs a DecodedException with the given ByteBuffer that cannot be decoded, and reason why.
|
DecodeException(ByteBuffer bb,
String message,
Throwable cause)
Constructor with the binary data that could not be decoded, and the reason why it failed to be, and the cause.
|
DecodeException(String encodedString,
String message)
Constructs a DecodedException with the given encoded string that cannot be decoded, and reason why.
|
DecodeException(String encodedString,
String message,
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 |
---|---|
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. |
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.. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public DecodeException(ByteBuffer bb, String message, 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(String encodedString, String message, 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(ByteBuffer bb, 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(String encodedString, String message)
encodedString
- the string representing the (part of) the message that could not be decoded.message
- the reason for the failure.public ByteBuffer getBytes()
null
if this exception arose from a failure to decode a text message.null
for text message failures.public String getText()
null
if this exception arose from a failure to decode a binary message..null
for binary message failures.Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.