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 extending `IOBaseStream`.
    `B` - the type of the stream extending `BaseStream`.
  All Superinterfaces:
    AutoCloseable, Closeable
  All Known Subinterfaces:
    IOStream<T>
  All Known Implementing Classes:
    IOBaseStreamAdapter, IOStreamAdapter

      public interface IOBaseStream<T,S extends IOBaseStream<T,S,B>,B extends java.util.stream.BaseStream<T,B>>
      extends Closeable

  Like `BaseStream` but throws `IOException`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default java.util.stream.BaseStream<T,B>` | `asBaseStream()` Constructs a `BaseStream` for this instance that throws `UncheckedIOException` instead of `IOException`.
    `default void` | `close()` Like `BaseStream.close()`.
    `default boolean` | `isParallel()` Like `BaseStream.isParallel()`.
    `default IOIterator<T>` | `iterator()` Like `BaseStream.iterator()`.
    `default S` | `onClose(IORunnable closeHandler)` Like `BaseStream.onClose(Runnable)`.
    `default S` | `parallel()` Like `BaseStream.parallel()`.
    `default S` | `sequential()` Like `BaseStream.sequential()`.
    `default IOSpliterator<T>` | `spliterator()` Like `BaseStream.spliterator()`.
    `default S` | `unordered()` Like `BaseStream.unordered()`.
    `B` | `unwrap()` Unwraps this instance and returns the underlying `Stream`.
    `S` | `wrap(B delegate)` Wraps a `Stream`.

- - ### Method Detail

    - #### asBaseStream

          default java.util.stream.BaseStream<T,B> asBaseStream()

      Constructs a `BaseStream` for this instance that throws `UncheckedIOException` instead of `IOException`.
      Returns:
        an `UncheckedIOException` `BaseStream`.

    - #### close

          default void close()

      Like `BaseStream.close()`.
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `Closeable`
      See Also:
        `BaseStream.close()`

    - #### isParallel

          default boolean isParallel()

      Like `BaseStream.isParallel()`.
      Returns:
        See `delegate`.
      See Also:
        `BaseStream.isParallel()`

    - #### iterator

          default IOIterator<T> iterator()

      Like `BaseStream.iterator()`.
      Returns:
        See `delegate`.
      See Also:
        `BaseStream.iterator()`

    - #### onClose

          default S onClose(IORunnable closeHandler)
                     throws IOException

      Like `BaseStream.onClose(Runnable)`.
      Parameters:
        `closeHandler` - See `delegate`.
      Returns:
        See `delegate`.
      Throws:
        `IOException` - if an I/O error occurs.
      See Also:
        `BaseStream.onClose(Runnable)`

    - #### parallel

          default S parallel()

      Like `BaseStream.parallel()`.
      Returns:
        See `delegate`.
      See Also:
        `BaseStream.parallel()`

    - #### sequential

          default S sequential()

      Like `BaseStream.sequential()`.
      Returns:
        See `delegate`.
      See Also:
        `BaseStream.sequential()`

    - #### spliterator

          default IOSpliterator<T> spliterator()

      Like `BaseStream.spliterator()`.
      Returns:
        See `delegate`.
      See Also:
        `BaseStream.spliterator()`

    - #### unordered

          default S unordered()

      Like `BaseStream.unordered()`.
      Returns:
        See `delegate`.
      See Also:
        `BaseStream.unordered()`

    - #### unwrap

          B unwrap()

      Unwraps this instance and returns the underlying `Stream`.

      Implementations may not have anything to unwrap and that behavior is undefined for now.

      Returns:
        the underlying stream.

    - #### wrap

          S wrap(B delegate)

      Wraps a `Stream`.
      Parameters:
        `delegate` - The delegate.
      Returns:
        An IO stream.