public class InvalidPathException extends IllegalArgumentException
Path
因为路径字符串包含无效的字符,或路径字符串无效的其他文件系统的具体原因。
Constructor and Description |
---|
InvalidPathException(String input, String reason)
从给定的输入字符串构造一个实例和原因。
|
InvalidPathException(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 InvalidPathException(String input, String reason, int index)
input
-输入字符串
reason
-字符串解释为什么输入被拒绝
index
-在错误发生时的指数,或
-1如果指数不知道
NullPointerException
-如果输入字符串
null或原因
IllegalArgumentException
如果误差指数小于
-1
public InvalidPathException(String input, String reason)
input
-输入字符串
reason
-字符串解释为什么输入被拒绝
NullPointerException
-如果输入字符串
null或原因
public String getInput()
public String getReason()
public int getIndex()
public String getMessage()
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.