@FunctionalInterface public interface LongIOConsumer
long
-valued argument and returns no result.
This is the IOException
throwing equivalent of LongConsumer
.Modifier and Type | Method and Description |
---|---|
void |
accept(long value)
Performs this operation on the given argument.
|
default LongIOConsumer |
andThen(LongIOConsumer after)
Returns a composed
LongIOConsumer that performs, in sequence, this operation followed by the after operation. |
static LongIOConsumer |
checked(LongConsumer operation)
Returns an
LongIOConsumer that performs the operation operation, and unwraps any UncheckedIOException that is thrown
by throwing its cause . |
static LongConsumer |
unchecked(LongIOConsumer operation)
Returns a
LongConsumer that performs the operation operation, and wraps any IOException that is thrown in an
UncheckedIOException . |
void accept(long value) throws IOException
value
- The input argument.IOException
- If an I/O error occurs.default LongIOConsumer andThen(LongIOConsumer after)
LongIOConsumer
that performs, in sequence, this operation followed by the after
operation.
If performing either operation throws an exception, it is relayed to the caller of the composed operation.
If performing this operation throws an exception, the after
operation will not be performed.after
- The operation to perform after this operation.LongIOConsumer
that performs in sequence this operation followed by the after
operation.NullPointerException
- If after
is null
.static LongConsumer unchecked(LongIOConsumer operation)
LongConsumer
that performs the operation
operation, and wraps any IOException
that is thrown in an
UncheckedIOException
.operation
- The operation to perform when the returned operation is performed.LongConsumer
that performs the operation
operation on its input, and wraps any IOException
that is thrown
in an UncheckedIOException
.NullPointerException
- If operation
is null
.static LongIOConsumer checked(LongConsumer operation)
LongIOConsumer
that performs the operation
operation, and unwraps any UncheckedIOException
that is thrown
by throwing its cause
.operation
- The operation to perform when the returned operation is performed.LongIOConsumer
that performs the operation
operation on its input, and unwraps any UncheckedIOException
that is thrown.NullPointerException
- If the given operation is null
.Copyright © 2017–2020. All rights reserved.