- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- All Implemented Interfaces:
-
Serializable
- 已知直接子类:
-
AttachOperationFailedException,ChangedCharSetException,CharacterCodingException,CharConversionException,ClosedChannelException,ClosedConnectionException,EOFException,FileLockInterruptionException,FileNotFoundException,FilerException,FileSystemException,HttpRetryException,HttpTimeoutException,IIOException,InterruptedByTimeoutException,InterruptedIOException,InvalidPropertiesFormatException,JMXProviderException,JMXServerErrorException,LoadException,MalformedURLException,ObjectStreamException,ProtocolException,RemoteException,SaslException,SocketException,SSLException,SyncFailedException,TransportTimeoutException,UnknownHostException,UnknownServiceException,UnsupportedDataTypeException,UnsupportedEncodingException,UserPrincipalNotFoundException,UTFDataFormatException,WebSocketHandshakeException,ZipException
public class IOException extends 异常
表示发生某种类型的I / O异常。 此类是由失败或中断的I / O操作产生的一般异常类。- 从以下版本开始:
- 1.0
- 另请参见:
-
InputStream,OutputStream, Serialized Form
-
-
构造方法摘要
构造方法 Constructor 描述 IOException()构造一个IOException其中包含null作为其错误详细消息。IOException(String message)构造具有指定详细消息的IOException。IOException(String message, Throwable cause)构造一个具有指定的详细信息和原因的IOException。IOException(Throwable cause)构造一个IOException与指定的原因和详细消息(cause==null ? null : cause.toString())(它通常包含的类和详细消息cause)。
-
方法摘要
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
构造方法详细信息
-
IOException
public IOException()
构造一个IOException其中包含null作为其错误详细消息。
-
IOException
public IOException(String message)
构造具有指定详细消息的IOException。- 参数
-
message- 详细信息(由Throwable.getMessage()方法保存供以后检索)
-
IOException
public IOException(String message, Throwable cause)
构造一个具有指定的详细信息和原因的IOException。请注意,与
cause相关联的详细信息不会自动并入此异常的详细消息。- 参数
-
message- 详细信息(由Throwable.getMessage()方法保存供以后检索) -
cause- 原因(保存以供Throwable.getCause()方法稍后检索)。 (允许空值,表示原因不存在或未知。) - 从以下版本开始:
- 1.6
-
IOException
public IOException(Throwable cause)
构造一个IOException与指定的原因和详细消息(cause==null ? null : cause.toString())(它通常包含的类和详细消息cause)。 这个构造函数对于IO异常非常有用,对于其他的throwable而言,它不仅仅是包装器。- 参数
-
cause- 原因(由Throwable.getCause()方法保存供以后检索)。 (允许空值,表示原因不存在或未知。) - 从以下版本开始:
- 1.6
-
-