APIdia Launch Partner
Top Description Fields Constructors Methods
java.io

public Class UncheckedIOException

extends RuntimeException
Class Inheritance
Imports
java.util.Objects

Wraps an IOException with an unchecked exception.
Since
1.8

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
UncheckedIOException(String
the detail message, can be null
message
,
IOException
the IOException
cause
)

Constructs an instance of this class.

public
UncheckedIOException(IOException
the IOException
cause
)

Constructs an instance of this class.

Method Summary

Modifier and TypeMethod and Description
public IOException

Returns:

the IOException which is the cause of this exception.
getCause
()

Overrides java.lang.Throwable.getCause.

Returns the cause of this exception.

private void
readObject(ObjectInputStream
the ObjectInputStream from which data is read
s
)

Hides java.lang.Throwable.readObject.

Called to read the object from a stream.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Annotations
@Serial

Constructor Detail

UncheckedIOExceptionback to summary
public UncheckedIOException(String message, IOException cause)

Constructs an instance of this class.

Parameters
message:String

the detail message, can be null

cause:IOException

the IOException

Exceptions
NullPointerException:
if the cause is null
UncheckedIOExceptionback to summary
public UncheckedIOException(IOException cause)

Constructs an instance of this class.

Parameters
cause:IOException

the IOException

Exceptions
NullPointerException:
if the cause is null

Method Detail

getCauseback to summary
public IOException getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this exception.

Returns:IOException

the IOException which is the cause of this exception.

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException

Hides java.lang.Throwable.readObject.

Called to read the object from a stream.

Parameters
s:ObjectInputStream

the ObjectInputStream from which data is read

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded
InvalidObjectException:
if the object is invalid or has a cause that is not an IOException