public class URISyntaxException extends Exception
URISyntaxException will be thrown if some information could not be parsed
while creating a URI.| Constructor and Description |
|---|
URISyntaxException(String input,
String reason)
Constructs a new
URISyntaxException instance containing the
string that caused the exception and a description of the problem. |
URISyntaxException(String input,
String reason,
int index)
Constructs a new
URISyntaxException instance containing the
string that caused the exception, a description of the problem and the
index at which the error occurred. |
| Modifier and Type | Method and Description |
|---|---|
int |
getIndex()
Gets the index at which the syntax error was found or
-1 if the
index is unknown/unavailable. |
String |
getInput()
Gets the initial string that contains an invalid syntax.
|
String |
getMessage()
Gets a description of the exception, including the reason, the string
that caused the syntax error and the position of the syntax error if
available.
|
String |
getReason()
Gets a description of the syntax error.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic URISyntaxException(String input, String reason, int index)
URISyntaxException instance containing the
string that caused the exception, a description of the problem and the
index at which the error occurred.input - the string that caused the exception.reason - the reason why the exception occurred.index - the position where the exception occurred.NullPointerException - if one of the arguments input or reason is
null.IllegalArgumentException - if the value for index is lesser than -1.public URISyntaxException(String input, String reason)
URISyntaxException instance containing the
string that caused the exception and a description of the problem.input - the string that caused the exception.reason - the reason why the exception occurred.NullPointerException - if one of the arguments input or reason is
null.public int getIndex()
-1 if the
index is unknown/unavailable.public String getReason()
public String getInput()
public String getMessage()
getMessage in class ThrowableThrowable.getMessage()