Most visited

Recently visited

Added in API level 1

IOException

public class IOException
extends 异常

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.io.IOException
Known Direct Subclasses
Known Indirect Subclasses


表示发生了某种I / O异常。 该类是由失败或中断的I / O操作产生的常规异常类。

也可以看看:

Summary

Public constructors

IOException()

null构造一个 IOException作为错误详细信息。

IOException(String message)

用指定的详细信息构造一个 IOException

IOException(String message, Throwable cause)

用指定的详细信息和原因构造一个 IOException

IOException(Throwable cause)

构造一个 IOException与指定的原因和详细消息 (cause==null ? null : cause.toString()) (它通常包含的类和详细消息 cause )。

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

IOException

Added in API level 1
IOException ()

null作为其错误详细信息构造一个 IOException

IOException

Added in API level 1
IOException (String message)

用指定的详细信息构造一个 IOException

Parameters
message String: The detail message (which is saved for later retrieval by the getMessage() method)

IOException

Added in API level 9
IOException (String message, 
                Throwable cause)

用指定的详细信息和原因构造一个 IOException

请注意,与 cause相关的详细消息 不会自动合并到此例外的详细消息中。

Parameters
message String: The detail message (which is saved for later retrieval by the getMessage() method)
cause Throwable: The cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

IOException

Added in API level 9
IOException (Throwable cause)

构造一个IOException与指定的原因和详细消息(cause==null ? null : cause.toString()) (它通常包含的类和详细消息cause )。 这个构造函数对IO异常很有用,它比其他throwables的包装器稍微多一点。

Parameters
cause Throwable: The cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

Hooray!