Top Description Fields Constructors
java.io

public Class IOException

extends Exception
Class Inheritance
Known Direct Subclasses
java.io.ObjectStreamException, java.io.SyncFailedException, java.io.UnsupportedEncodingException, java.io.UTFDataFormatException, java.net.HttpRetryException, java.net.ProtocolException, java.net.UnknownHostException, java.net.UnknownServiceException, java.net.MalformedURLException, java.net.SocketException, java.nio.channels.ClosedChannelException, java.nio.channels.FileLockInterruptionException, java.nio.channels.InterruptedByTimeoutException, java.nio.charset.CharacterCodingException, java.nio.file.FileSystemException, java.nio.file.attribute.UserPrincipalNotFoundException, java.util.zip.ZipException, javax.net.ssl.SSLException, sun.net.TelnetProtocolException, sun.security.pkcs.ParsingException, sun.security.timestamp.TSResponse.TimestampException, sun.net.ftp.FtpLoginException, sun.net.smtp.SmtpProtocolException, java.util.InvalidPropertiesFormatException, java.io.CharConversionException, java.io.EOFException, java.io.FileNotFoundException, java.io.InterruptedIOException

Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.
Since
1.0
See Also
java.io.InputStream, java.io.OutputStream

Field Summary

Modifier and TypeField and Description
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
IOException()

Constructs an IOException with null as its error detail message.

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

Constructs an IOException with the specified detail message.

public
IOException(String
The detail message (which is saved for later retrieval by the getMessage() method)
message
,
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.)
cause
)

Constructs an IOException with the specified detail message and cause.

public
IOException(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.)
cause
)

Constructs an IOException with the specified cause and a detail message of (cause==null ?

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Annotations
@Serial

Constructor Detail

IOExceptionback to summary
public IOException()

Constructs an IOException with null as its error detail message.

IOExceptionback to summary
public IOException(String message)

Constructs an IOException with the specified detail message.

Parameters
message:String

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

IOExceptionback to summary
public IOException(String message, Throwable cause)

Constructs an IOException with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated into this exception's detail message.

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.)

Since
1.6
IOExceptionback to summary
public IOException(Throwable cause)

Constructs an IOException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for IO exceptions that are little more than wrappers for other 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.)

Since
1.6