Package org.apache.commons.io
Class UncheckedIOExceptions
- java.lang.Object
-
- org.apache.commons.io.UncheckedIOExceptions
-
final class UncheckedIOExceptions extends java.lang.Object
Helps use lambdas that throwIOException
rethrow asUncheckedIOException
.- Since:
- 2.12.0
-
-
Constructor Summary
Constructors Modifier Constructor Description private
UncheckedIOExceptions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.UncheckedIOException
create(java.lang.Object message)
Creates a new UncheckedIOException for the given detail message.static java.io.UncheckedIOException
wrap(java.io.IOException e, java.lang.Object message)
Creates a new UncheckedIOException for the given detail message.
-
-
-
Method Detail
-
create
public static java.io.UncheckedIOException create(java.lang.Object message)
Creates a new UncheckedIOException for the given detail message.This method exists because there is no String constructor in
UncheckedIOException
.- Parameters:
message
- the detail message.- Returns:
- a new
UncheckedIOException
.
-
wrap
public static java.io.UncheckedIOException wrap(java.io.IOException e, java.lang.Object message)
Creates a new UncheckedIOException for the given detail message.This method exists because there is no String constructor in
UncheckedIOException
.- Parameters:
e
- cause theIOException
.message
- the detail message.- Returns:
- a new
UncheckedIOException
.
-
-