java.net
public class URISyntaxException extends Exception
URI
,
Serialized FormConstructor and Description |
---|
URISyntaxException(String input,
String msg)
Create an exception from the invalid string, with the index set to -1.
|
URISyntaxException(String input,
String msg,
int index)
Create an exception from the invalid string, with the index of the
point of failure.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Returns the index of the failure, or -1.
|
String |
getInput()
Returns the bad input string.
|
String |
getMessage()
Returns a message describing the parse error, as if by
getReason() + (getIndex() >= 0 ? |
String |
getReason()
Returns the reason for the failure.
|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public URISyntaxException(String input, String msg)
input
- the bad URImsg
- the descriptive error messageNullPointerException
- if input or msg are nullpublic URISyntaxException(String input, String msg, int index)
input
- the bad URImsg
- the descriptive error messageindex
- the index of the parse error, or -1NullPointerException
- if input or msg are nullIllegalArgumentException
- if index < -1public String getInput()
public String getReason()
public int getIndex()
public String getMessage()
getReason() + (getIndex() >= 0 ? " at index " + getIndex() : "")
+ ": " + getInput()
.getMessage
in class Throwable