public class DataStreamException
extends java.io.IOException
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BAD_LENGTH
Constant representing a datastream reply type that has an unexpected datastream length (LL).
|
static java.lang.String |
BAD_REPLY
Constant representing a datastream reply type that has an unexpected reply.
|
static java.lang.String |
BAD_RETURN_CODE
Constant representing a datastream reply type that has an unsuccessful return code.
|
static java.lang.String |
ERROR_MESSAGE
Constant representing a datastream reply type that contains an error message.
|
Modifier | Constructor and Description |
---|---|
protected |
DataStreamException(java.lang.String type,
java.lang.String dataStreamName,
int value) |
Modifier and Type | Method and Description |
---|---|
void |
addMessage(Message message)
Associates a message with this exception.
|
static DataStreamException |
badLength(java.lang.String dataStreamName,
int value)
Factory method for constructing a datastream exception with the provided bad length value.
|
static DataStreamException |
badReply(java.lang.String dataStreamName,
int codepoint)
Factory method for constructing a datastream exception with the provided bad reply value.
|
static DataStreamException |
badReturnCode(java.lang.String dataStreamName,
int value)
Factory method for constructing a datastream exception with the provided bad return code value.
|
static DataStreamException |
errorMessage(java.lang.String dataStreamName,
Message message)
Factory method for constructing a datastream exception with the provided error message.
|
java.lang.String |
getDataStreamName()
Returns the name of the datastream that caused this exception.
|
Message |
getErrorMessage()
Returns the primary error message associated with this exception, if any.
|
Message[] |
getErrorMessages()
Returns the array of error messages associated with this exception, if any.
|
java.lang.String |
getType()
Returns the datastream reply type.
|
int |
getValue()
Returns the value associated with this exception, if any.
|
public static final java.lang.String BAD_RETURN_CODE
public static final java.lang.String BAD_LENGTH
public static final java.lang.String BAD_REPLY
public static final java.lang.String ERROR_MESSAGE
protected DataStreamException(java.lang.String type, java.lang.String dataStreamName, int value)
public java.lang.String getType()
public java.lang.String getDataStreamName()
public int getValue()
public Message getErrorMessage()
public void addMessage(Message message)
public Message[] getErrorMessages()
public static DataStreamException badReturnCode(java.lang.String dataStreamName, int value)
public static DataStreamException badLength(java.lang.String dataStreamName, int value)
public static DataStreamException badReply(java.lang.String dataStreamName, int codepoint)
public static DataStreamException errorMessage(java.lang.String dataStreamName, Message message)