@Private
public final class FunctionalIO
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static <T> T |
extractIOExceptions(java.util.function.Supplier<T> call) |
Invoke the supplier, catching any
UncheckedIOException raised,
extracting the inner IOException and rethrowing it. |
static <T,R> |
toUncheckedFunction(FunctionRaisingIOE<T,R> fun) |
Convert a
FunctionRaisingIOE as a Supplier. |
static <T> java.util.function.Supplier<T> |
toUncheckedIOExceptionSupplier(CallableRaisingIOE<T> call) |
Wrap a
CallableRaisingIOE as a Supplier. |
static <T> T |
uncheckIOExceptions(CallableRaisingIOE<T> call) |
Invoke any operation, wrapping IOExceptions with
UncheckedIOException. |
public static <T> T uncheckIOExceptions(CallableRaisingIOE<T> call)
UncheckedIOException.T - type of resultcall - callablejava.io.UncheckedIOException - if an IOE was raised.public static <T> java.util.function.Supplier<T> toUncheckedIOExceptionSupplier(CallableRaisingIOE<T> call)
CallableRaisingIOE as a Supplier.T - type of resultcall - call to wrappublic static <T> T extractIOExceptions(java.util.function.Supplier<T> call)
throws java.io.IOException
UncheckedIOException raised,
extracting the inner IOException and rethrowing it.T - type of resultcall - call to invokejava.io.IOException - if the call raised an IOException wrapped by an UncheckedIOException.public static <T,R> java.util.function.Function<T,R> toUncheckedFunction(FunctionRaisingIOE<T,R> fun)
FunctionRaisingIOE as a Supplier.T - type of inputR - type of return value.fun - function to wrapCopyright © 2008–2025 Apache Software Foundation. All rights reserved.