Package org.apache.commons.io.function
Interface IOBaseStream<T,S extends IOBaseStream<T,S,B>,B extends 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:
AutoCloseable
,Closeable
- All Known Subinterfaces:
IOStream<T>
public interface IOBaseStream<T,S extends IOBaseStream<T,S,B>,B extends BaseStream<T,B>>
extends Closeable
Like
BaseStream
but throws IOException
.- Since:
- 2.12.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault BaseStream<T,
B> default void
close()
LikeBaseStream.close()
.default boolean
LikeBaseStream.isParallel()
.default IOIterator<T>
iterator()
LikeBaseStream.iterator()
.default S
onClose
(IORunnable closeHandler) default S
parallel()
LikeBaseStream.parallel()
.default S
LikeBaseStream.sequential()
.default IOSpliterator<T>
LikeBaseStream.spliterator()
.default S
LikeBaseStream.unordered()
.unwrap()
Unwraps this instance and returns the underlyingStream
.Wraps aStream
.
-
Method Details
-
asBaseStream
- Returns:
- an
UncheckedIOException
BaseStream
.
-
close
LikeBaseStream.close()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- See Also:
-
isParallel
LikeBaseStream.isParallel()
.- Returns:
- See
delegate
. - See Also:
-
iterator
LikeBaseStream.iterator()
.- Returns:
- See
delegate
. - See Also:
-
onClose
- Parameters:
closeHandler
- Seedelegate
.- Returns:
- See
delegate
. - Throws:
IOException
- if an I/O error occurs.- See Also:
-
parallel
LikeBaseStream.parallel()
.- Returns:
- See
delegate
. - See Also:
-
sequential
LikeBaseStream.sequential()
.- Returns:
- See
delegate
. - See Also:
-
spliterator
LikeBaseStream.spliterator()
.- Returns:
- See
delegate
. - See Also:
-
unordered
LikeBaseStream.unordered()
.- Returns:
- See
delegate
. - See Also:
-
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.
-
wrap
Wraps aStream
.- Parameters:
delegate
- The delegate.- Returns:
- An IO stream.
-