Package org.apache.commons.io.function
Class IOStreams
java.lang.Object
org.apache.commons.io.function.IOStreams
Keep this code package-private for now.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T> void
forAll
(Stream<T> stream, IOConsumer<T> action) (package private) static <T> void
forAll
(Stream<T> stream, IOConsumer<T> action, BiFunction<Integer, IOException, IOException> exSupplier) (package private) static <T> void
forEach
(Stream<T> stream, IOConsumer<T> action) (package private) static <T> Stream
<T> Null-safe version ofStreamSupport.stream(java.util.Spliterator, boolean)
.(package private) static <T> Stream
<T> (package private) static <T> Stream
<T> of
(T... values) Null-safe version ofStream.of(Object[])
.(package private) static <T> IOConsumer
<T> toIOConsumer
(IOConsumer<T> action)
-
Field Details
-
NONE
-
-
Constructor Details
-
IOStreams
private IOStreams()
-
-
Method Details
-
forAll
- Throws:
IOExceptionList
-
forAll
static <T> void forAll(Stream<T> stream, IOConsumer<T> action, BiFunction<Integer, IOException, throws IOExceptionListIOException> exSupplier) - Throws:
IOExceptionList
-
forEach
- Throws:
IOException
-
of
Null-safe version ofStreamSupport.stream(java.util.Spliterator, boolean)
. Copied from Apache Commons Lang.- Type Parameters:
T
- the type of stream elements.- Parameters:
values
- the elements of the new stream, may benull
.- Returns:
- the new stream on
values
orStream.empty()
.
-
of
-
of
Null-safe version ofStream.of(Object[])
. Copied from Apache Commons Lang.- Type Parameters:
T
- the type of stream elements.- Parameters:
values
- the elements of the new stream, may benull
.- Returns:
- the new stream on
values
orStream.empty()
.
-
toIOConsumer
-