Uses of Interface
org.apache.commons.io.function.IOConsumer
Package
Description
Provides classes for working with streams, readers, writers and files.
Provides IO-only related functional interfaces for lambda expressions and method references.
Provides implementations of output classes, such as
OutputStream
and
Writer
.-
Uses of IOConsumer in org.apache.commons.io
Modifier and TypeMethodDescriptionstatic void
IOUtils.close
(Closeable closeable, IOConsumer<IOException> consumer) Closes the givenCloseable
as a null-safe operation. -
Uses of IOConsumer in org.apache.commons.io.function
Modifier and TypeFieldDescriptionstatic final IOConsumer<?>
IOConsumer.NOOP_IO_CONSUMER
Consider private.Modifier and TypeMethodDescriptiondefault IOConsumer<T>
IOConsumer.andThen
(IOConsumer<? super T> after) Returns a composedIOConsumer
that performs, in sequence, this operation followed by theafter
operation.default IOConsumer<T>
Returns a composedIOFunction
that first applies this function to its input, and then applies theafter
consumer to the result.default IOConsumer<T>
IOFunction.andThen
(IOConsumer<? super R> after) Returns a composedIOFunction
that first applies this function to its input, and then applies theafter
consumer to the result.static <T> IOConsumer<T>
IOConsumer.noop()
Returns the constant no-op consumer.Modifier and TypeMethodDescriptionstatic <T> void
Uncheck.accept
(IOConsumer<T> consumer, T t) Accepts an IO consumer with the given argument.default IOConsumer<T>
IOConsumer.andThen
(IOConsumer<? super T> after) Returns a composedIOConsumer
that performs, in sequence, this operation followed by theafter
operation.default IOConsumer<T>
IOFunction.andThen
(IOConsumer<? super R> after) Returns a composedIOFunction
that first applies this function to its input, and then applies theafter
consumer to the result.static <T> void
IOConsumer.forAll
(IOConsumer<T> action, Iterable<T> iterable) Performs an action for each element of the collection gathering any exceptions.static <T> void
IOConsumer.forAll
(IOConsumer<T> action, Stream<T> stream) Performs an action for each element of the collection gathering any exceptions.static <T> void
IOConsumer.forAll
(IOConsumer<T> action, T... array) Performs an action for each element of the array, gathering any exceptions.default void
IOStream.forAll
(IOConsumer<T> action) Performs an action for each element gathering any exceptions.default void
IOStream.forAll
(IOConsumer<T> action, BiFunction<Integer, IOException, IOException> exSupplier) Performs an action for each element gathering any exceptions.static <T> void
IOConsumer.forEach
(Iterable<T> iterable, IOConsumer<T> action) Performs an action for each element of the collection, stopping at the first exception.static <T> void
IOConsumer.forEach
(Stream<T> stream, IOConsumer<T> action) Performs an action for each element of the stream, stopping at the first exception.static <T> void
IOConsumer.forEach
(T[] array, IOConsumer<T> action) Performs an action for each element of this array, stopping at the first exception.default void
IOStream.forEach
(IOConsumer<? super T> action) LikeStream.forEach(java.util.function.Consumer)
but throwsIOException
.default void
IOStream.forEachOrdered
(IOConsumer<? super T> action) default void
IOIterator.forEachRemaining
(IOConsumer<? super E> action) default void
IOSpliterator.forEachRemaining
(IOConsumer<? super T> action) IOStream.peek
(IOConsumer<? super T> action) default boolean
IOSpliterator.tryAdvance
(IOConsumer<? super T> action) -
Uses of IOConsumer in org.apache.commons.io.output
ModifierConstructorDescriptionThresholdingOutputStream
(int threshold, IOConsumer<ThresholdingOutputStream> thresholdConsumer, IOFunction<ThresholdingOutputStream, OutputStream> outputStreamGetter) Constructs an instance of this class which will trigger an event at the specified threshold.