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.CloseableLikeBaseStreambut 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()Constructs aBaseStreamfor this instance that throwsUncheckedIOExceptioninstead ofIOException.default voidclose()LikeBaseStream.close().default booleanisParallel()LikeBaseStream.isParallel().default IOIterator<T>iterator()LikeBaseStream.iterator().default SonClose(IORunnable closeHandler)LikeBaseStream.onClose(Runnable).default Sparallel()LikeBaseStream.parallel().default Ssequential()LikeBaseStream.sequential().default IOSpliterator<T>spliterator()LikeBaseStream.spliterator().default Sunordered()LikeBaseStream.unordered().Bunwrap()Unwraps this instance and returns the underlyingStream.Swrap(B delegate)Wraps aStream.
-
-
-
Method Detail
-
asBaseStream
default java.util.stream.BaseStream<T,B> asBaseStream()
Constructs aBaseStreamfor this instance that throwsUncheckedIOExceptioninstead ofIOException.- Returns:
- an
UncheckedIOExceptionBaseStream.
-
close
default void close()
LikeBaseStream.close().- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein 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.
-
-