public class URISyntaxException extends java.lang.Exception
URI,
Serialized Form| Constructor and Description |
|---|
URISyntaxException(java.lang.String input,
java.lang.String msg)
Create an exception from the invalid string, with the index set to -1.
|
URISyntaxException(java.lang.String input,
java.lang.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.
|
java.lang.String |
getInput()
Returns the bad input string.
|
java.lang.String |
getMessage()
Returns a message describing the parse error, as if by
getReason() + (getIndex() >= 0 ? |
java.lang.String |
getReason()
Returns the reason for the failure.
|
public URISyntaxException(java.lang.String input, java.lang.String msg)
input - the bad URImsg - the descriptive error messagejava.lang.NullPointerException - if input or msg are nullpublic URISyntaxException(java.lang.String input, java.lang.String msg, int index)
input - the bad URImsg - the descriptive error messageindex - the index of the parse error, or -1java.lang.NullPointerException - if input or msg are nulljava.lang.IllegalArgumentException - if index < -1public java.lang.String getInput()
public java.lang.String getReason()
public int getIndex()
public java.lang.String getMessage()
getReason() + (getIndex() >= 0 ? " at index " + getIndex() : "")
+ ": " + getInput().getMessage in class java.lang.Throwable