Package org.apache.commons.io.function
Interface IOBaseStream<T,S extends IOBaseStream<T,S,B>,B extends java.util.stream.BaseStream<T,B>>
-
- Type Parameters:
T
- the type of the stream elements.S
- the type of the IO stream extendingIOBaseStream
.B
- the type of the stream extendingBaseStream
.
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Subinterfaces:
IOStream<T>
public interface IOBaseStream<T,S extends IOBaseStream<T,S,B>,B extends java.util.stream.BaseStream<T,B>> extends java.io.Closeable
LikeBaseStream
but throwsIOException
.- Since:
- 2.12.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.stream.BaseStream<T,B>
asBaseStream()
Creates aBaseStream
for this instance that throwsUncheckedIOException
instead ofIOException
.default void
close()
LikeBaseStream.close()
.default boolean
isParallel()
LikeBaseStream.isParallel()
.default IOIterator<T>
iterator()
LikeBaseStream.iterator()
.default S
onClose(IORunnable closeHandler)
LikeBaseStream.onClose(Runnable)
.default S
parallel()
LikeBaseStream.parallel()
.default S
sequential()
LikeBaseStream.sequential()
.default IOSpliterator<T>
spliterator()
LikeBaseStream.spliterator()
.default S
unordered()
LikeBaseStream.unordered()
.B
unwrap()
Unwraps this instance and returns the underlyingStream
.S
wrap(B delegate)
Wraps aStream
.
-
-
-
Method Detail
-
asBaseStream
default java.util.stream.BaseStream<T,B> asBaseStream()
Creates aBaseStream
for this instance that throwsUncheckedIOException
instead ofIOException
.- Returns:
- an
UncheckedIOException
BaseStream
.
-
close
default void close()
LikeBaseStream.close()
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- See Also:
BaseStream.close()
-
isParallel
default boolean isParallel()
LikeBaseStream.isParallel()
.- Returns:
- See
delegate
. - See Also:
BaseStream.isParallel()
-
iterator
default IOIterator<T> iterator()
LikeBaseStream.iterator()
.- Returns:
- See
delegate
. - See Also:
BaseStream.iterator()
-
onClose
default S onClose(IORunnable closeHandler) throws java.io.IOException
LikeBaseStream.onClose(Runnable)
.- Parameters:
closeHandler
- Seedelegate
.- Returns:
- See
delegate
. - Throws:
java.io.IOException
- if an I/O error occurs.- See Also:
BaseStream.onClose(Runnable)
-
parallel
default S parallel()
LikeBaseStream.parallel()
.- Returns:
- See
delegate
. - See Also:
BaseStream.parallel()
-
sequential
default S sequential()
LikeBaseStream.sequential()
.- Returns:
- See
delegate
. - See Also:
BaseStream.sequential()
-
spliterator
default IOSpliterator<T> spliterator()
LikeBaseStream.spliterator()
.- Returns:
- See
delegate
. - See Also:
BaseStream.spliterator()
-
unordered
default S unordered()
LikeBaseStream.unordered()
.- Returns:
- See
delegate
. - See Also:
BaseStream.unordered()
-
unwrap
B unwrap()
Unwraps this instance and returns the underlyingStream
.Implementations may not have anything to unwrap and that behavior is undefined for now.
- Returns:
- the underlying stream.
-
-