public class IIOException extends IOException
除了消息字符串之外,还保留对另一个Throwable ( Error或异常 )的引用。 这个引用,如果null ,是引发这个异常发生的事件。 例如,从IOException读取的File将被存储在那里。
| Constructor and Description |
|---|
IIOException(String message)
构造一个
IIOException与给定的消息
String 。
|
IIOException(String message, Throwable cause)
构造一个
IIOException与给定的消息
String和一个
Throwable这是其根本原因。
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic IIOException(String message)
IIOException与给定的消息String 。
没有根本原因设定;
getCause将返回null 。
message - 错误信息。
Throwable.getMessage()
public IIOException(String message, Throwable cause)
IIOException与给定的消息
String和一个
Throwable这是其根本原因。
message - 错误信息。
cause - 导致此异常发生的
Throwable (
Error或
异常 )。
Throwable.getCause(),
Throwable.getMessage()
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.