public class KeySelectorException extends 异常
KeySelector抛出的异常情况 。
一个KeySelectorException可以包含一个原因:另一个可抛出的,导致这KeySelectorException被抛出。
| Constructor and Description |
|---|
KeySelectorException()
构造一个新的
KeySelectorException与
null作为其详细信息。
|
KeySelectorException(String message)
构造一个新的
KeySelectorException与指定的详细信息。
|
KeySelectorException(String message, Throwable cause)
构造一个新的
KeySelectorException与指定的详细信息和原因。
|
KeySelectorException(Throwable cause)
构造一个新的
KeySelectorException与指定的原因和详细消息
(cause==null ? null : cause.toString()) (它通常包含的类和详细消息
cause )。
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
如果原因不存在或未知,则返回此
KeySelectorException或
null的原因。
|
void |
printStackTrace()
打印此
KeySelectorException ,其回溯和原因回溯到标准错误流。
|
void |
printStackTrace(PrintStream s)
打印此
KeySelectorException ,其回溯和原因回溯到指定的打印流。
|
void |
printStackTrace(PrintWriter s)
打印
KeySelectorException ,它的回溯和原因的回溯到指定的打印作者。
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toStringpublic KeySelectorException()
KeySelectorException与
null作为其详细信息。
public KeySelectorException(String message)
KeySelectorException具有指定的详细信息。
message - 详细信息
public KeySelectorException(String message, Throwable cause)
KeySelectorException与指定的详细信息和原因。
请注意,与cause联的详细信息不会自动并入此异常的详细消息。
message - 详细信息
cause - 原因(
允许 A
null值,表示原因不存在或未知)。
public KeySelectorException(Throwable cause)
KeySelectorException与指定的原因和详细消息
(cause==null ? null : cause.toString()) (它通常包含的类和详细消息
cause )。
cause - 原因(
允许使用 A
null值,表示原因不存在或未知)。
public Throwable getCause()
KeySelectorException或null的原因。
(原因是引发这个KeySelectorException可抛出的)。
public void printStackTrace()
KeySelectorException ,其回溯和原因回溯到标准错误流。
printStackTrace在
Throwable
public void printStackTrace(PrintStream s)
KeySelectorException ,其回溯和原因回溯到指定的打印流。
printStackTrace在类
Throwable
s -
PrintStream用于输出
public void printStackTrace(PrintWriter s)
KeySelectorException ,其回溯和原因回溯到指定的打印作者。
printStackTrace在
Throwable
s -
PrintWriter to use for output
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.