public class URIException extends HttpException
Modifier and Type | Field and Description |
---|---|
static int |
ESCAPING
The URI escape encoding and decoding error.
|
static int |
PARSING
The URI parsing error.
|
static int |
PUNYCODE
The DNS punycode encoding or decoding error.
|
protected String |
reason
The reason message.
|
protected int |
reasonCode
The reason code.
|
static int |
UNKNOWN
No specified reason code.
|
static int |
UNSUPPORTED_ENCODING
The unsupported character encoding.
|
Constructor and Description |
---|
URIException()
Default constructor.
|
URIException(int reasonCode)
The constructor with a reason code argument.
|
URIException(int reasonCode,
String reason)
The constructor with a reason string and its code arguments.
|
URIException(String reason)
The constructor with a reason string argument.
|
Modifier and Type | Method and Description |
---|---|
String |
getReason()
Deprecated.
You should instead call
Throwable.getMessage() . |
int |
getReasonCode()
Get the reason code.
|
void |
setReason(String reason)
Deprecated.
Callers should instead set this via a parameter to the constructor.
|
void |
setReasonCode(int reasonCode)
Deprecated.
Callers should set the reason code as a parameter to the
constructor.
|
getCause, printStackTrace, printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public static final int UNKNOWN
public static final int PARSING
public static final int UNSUPPORTED_ENCODING
public static final int ESCAPING
public static final int PUNYCODE
protected int reasonCode
protected String reason
public URIException()
public URIException(int reasonCode)
reasonCode
- the reason codepublic URIException(int reasonCode, String reason)
reasonCode
- the reason codereason
- the reasonpublic URIException(String reason)
reason
- the reasonpublic int getReasonCode()
getReasonCode
in class HttpException
public void setReasonCode(int reasonCode)
setReasonCode
in class HttpException
reasonCode
- the reason codepublic String getReason()
Throwable.getMessage()
.getReason
in class HttpException
public void setReason(String reason)
setReason
in class HttpException
reason
- the reason messageCopyright © 2019. All Rights Reserved.