public class URISyntaxException extends 异常
URI
,
Serialized Form
Constructor and Description |
---|
URISyntaxException(String input, String reason)
从给定的输入字符串构造一个实例和原因。
|
URISyntaxException(String input, String reason, int index)
从给定的输入字符串构造一个实例,原因和错误索引。
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
返回一个索引处的分析错误发生的位置输入的字符串,或
-1 如果这个位置是不知道的。
|
String |
getInput()
返回输入字符串。
|
String |
getMessage()
返回描述分析错误的字符串。
|
String |
getReason()
返回一个字符串,解释为什么无法解析输入字符串。
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public URISyntaxException(String input, String reason, int index)
input
-输入字符串
reason
-字符串解释为什么输入无法解析
index
解析错误的指数,或
-1
如果指数不知道
NullPointerException
-如果输入字符串
null
或原因
IllegalArgumentException
如果误差指数小于
-1
public URISyntaxException(String input, String reason)
-1
误差指标。
input
-输入字符串
reason
-字符串解释为什么输入无法解析
NullPointerException
-如果输入字符串
null
或原因
public String getInput()
public String getReason()
public int getIndex()
-1
如果这个位置是不知道的。
public String getMessage()
':'
),空间,和输入的字符串。如果错误指数在小数定义字符串
" at index "
紧跟指数,,插入后的原因和之前的冒号字符字符串。
getMessage
方法重写,继承类
Throwable
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.