public interface IORunnable
IOException
throwing equivalent of Runnable
.Modifier and Type | Method and Description |
---|---|
static IORunnable |
checked(Runnable action)
Returns a
Runnable that performs the action action, and unwraps any UncheckedIOException that is thrown by throwing its
cause . |
void |
run()
Performs this action.
|
static Runnable |
unchecked(IORunnable action)
Returns a
Runnable that performs the action action, and wraps any IOException that is thrown in an
UncheckedIOException . |
void run() throws IOException
IOException
- If an I/O error occurs.static Runnable unchecked(IORunnable action)
Runnable
that performs the action
action, and wraps any IOException
that is thrown in an
UncheckedIOException
.action
- The action to perform when the returned action is performed.Runnable
that performs the action
action, and wraps any IOException
that is thrown in an
UncheckedIOException
.NullPointerException
- If action
is null
.static IORunnable checked(Runnable action)
Runnable
that performs the action
action, and unwraps any UncheckedIOException
that is thrown by throwing its
cause
.action
- The action to perform when the returned action is performed.Runnable
that performs the action
action, and unwraps any IOException
that is thrown by throwing its
cause
..NullPointerException
- If action
is null
.Copyright © 2017–2020. All rights reserved.