JavaTM 2 Platform
Standard Ed. 6

java.io
类 IOException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 java.io.IOException
所有已实现的接口:
Serializable
直接已知子类:
ChangedCharSetException, CharacterCodingException, CharConversionException, ClosedChannelException, EOFException, FileLockInterruptionException, FileNotFoundException, FilerException, HttpRetryException, IIOException, InterruptedIOException, InvalidPropertiesFormatException, JMXProviderException, JMXServerErrorException, MalformedURLException, ObjectStreamException, ProtocolException, RemoteException, SaslException, SocketException, SSLException, SyncFailedException, UnknownHostException, UnknownServiceException, UnsupportedDataTypeException, UnsupportedEncodingException, UTFDataFormatException, ZipException

public class IOException
extends Exception

当发生某种 I/O 异常时,抛出此异常。此类是失败或中断的 I/O 操作生成的异常的通用类。

从以下版本开始:
JDK1.0
另请参见:
InputStream, OutputStream, 序列化表格

构造方法摘要
IOException()
          构造一个 IOException,使用 null 作为其错误详细消息。
IOException(String message)
          构造带指定详细消息的 IOException
IOException(String message, Throwable cause)
          构造带有指定详细消息和 cause 的 IOException
IOException(Throwable cause)
          构造一个 IOException,使其具有指定的 cause 以及详细消息 (cause==null ? null : cause.toString())(通常包含类和 cause 的详细消息)。
 
方法摘要
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

IOException

public IOException()
构造一个 IOException,使用 null 作为其错误详细消息。


IOException

public IOException(String message)
构造带指定详细消息的 IOException

参数:
message - 详细消息(保存此消息,以便 Throwable.getMessage() 方法稍后获得该消息)

IOException

public IOException(String message,
                   Throwable cause)
构造带有指定详细消息和 cause 的 IOException

注意,关联 cause 的详细消息不会 自动合并到此异常的详细消息中。

参数:
message - 详细消息(保存此消息,以便 Throwable.getMessage() 方法稍后获得该消息)
cause - cause(保存此 cause,以便 Throwable.getCause() 方法稍后获得它)。(允许使用 null 值,它表示 cause 不存在或未知。)
从以下版本开始:
1.6

IOException

public IOException(Throwable cause)
构造一个 IOException,使其具有指定的 cause 以及详细消息 (cause==null ? null : cause.toString())(通常包含类和 cause 的详细消息)。对于与其他 throwable 的包装器没有多大差别的 IO 异常,此构造方法很有用。

参数:
cause - cause(保存此 cause,以便 Throwable.getCause() 方法稍后获得它)。(允许使用 null 值,它表示 cause 不存在或未知。)
从以下版本开始:
1.6

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only