Package com.globalmentor.io.function
Interface IOConsumer<T>
- Type Parameters:
T
- the type of the input to the operation.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents an I/O operation that accepts a single input argument and returns no result.
This interface is similar to Consumer
except that it is allowed to throw an IOException
.
- Author:
- Garret Wilson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is the same asConsumer.accept(Object)
, but with a support forIOException
.default IOConsumer<T>
andThen
(IOConsumer<? super T> after) This method is the same asConsumer.andThen(Consumer)
, but with a support forIOException
.
-
Method Details
-
accept
This method is the same as
Consumer.accept(Object)
, but with a support forIOException
.- Parameters:
t
- the input argument- Throws:
IOException
- if there is an I/O error performing the operation
-
andThen
This method is the same as
Consumer.andThen(Consumer)
, but with a support forIOException
.- Parameters:
after
- The operation to perform after this operation.- Returns:
- A consumer that performs this operation followed by the given operation in sequence.
- Throws:
IOException
- if there is an I/O error performing the operation.
-