Package org.apache.commons.io.function
Class IOStreams
- java.lang.Object
-
- org.apache.commons.io.function.IOStreams
-
final class IOStreams extends java.lang.ObjectKeep this code package-private for now.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.ObjectNONE
-
Constructor Summary
Constructors Modifier Constructor Description privateIOStreams()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static <T> voidforAll(java.util.stream.Stream<T> stream, IOConsumer<T> action)(package private) static <T> voidforAll(java.util.stream.Stream<T> stream, IOConsumer<T> action, java.util.function.BiFunction<java.lang.Integer,java.io.IOException,java.io.IOException> exSupplier)(package private) static <T> voidforEach(java.util.stream.Stream<T> stream, IOConsumer<T> action)(package private) static <T> java.util.stream.Stream<T>of(java.lang.Iterable<T> values)Null-safe version ofStreamSupport.stream(java.util.Spliterator, boolean).(package private) static <T> java.util.stream.Stream<T>of(java.util.stream.Stream<T> stream)(package private) static <T> java.util.stream.Stream<T>of(T... values)Null-safe version ofStream.of(Object[]).(package private) static <T> IOConsumer<T>toIOConsumer(IOConsumer<T> action)
-
-
-
Method Detail
-
forAll
static <T> void forAll(java.util.stream.Stream<T> stream, IOConsumer<T> action) throws IOExceptionList- Throws:
IOExceptionList
-
forAll
static <T> void forAll(java.util.stream.Stream<T> stream, IOConsumer<T> action, java.util.function.BiFunction<java.lang.Integer,java.io.IOException,java.io.IOException> exSupplier) throws IOExceptionList- Throws:
IOExceptionList
-
forEach
static <T> void forEach(java.util.stream.Stream<T> stream, IOConsumer<T> action) throws java.io.IOException- Throws:
java.io.IOException
-
of
static <T> java.util.stream.Stream<T> of(java.lang.Iterable<T> values)
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
valuesorStream.empty().
-
of
static <T> java.util.stream.Stream<T> of(java.util.stream.Stream<T> stream)
-
of
@SafeVarargs static <T> java.util.stream.Stream<T> of(T... values)
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
valuesorStream.empty().
-
toIOConsumer
static <T> IOConsumer<T> toIOConsumer(IOConsumer<T> action)
-
-