org.apache.commons.io.function

## Class IOStreamAdapter<T>

- java.lang.Object
- - org.apache.commons.io.function.IOBaseStreamAdapter<T,IOStream<T>,java.util.stream.Stream<T>>
  - - org.apache.commons.io.function.IOStreamAdapter<T>

- Type Parameters:
    `T` - the type of the stream elements.
  All Implemented Interfaces:
    Closeable, AutoCloseable, IOBaseStream<T,IOStream<T>,java.util.stream.Stream<T>>, IOStream<T>

      final class IOStreamAdapter<T>
      extends IOBaseStreamAdapter<T,IOStream<T>,java.util.stream.Stream<T>>
      implements IOStream<T>

  Adapts an `Stream` as an `IOStream`. Keep package-private for now.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) static <T> IOStream<T>` | `adapt(java.util.stream.Stream<T> delegate)` Constructs a new IOStream for the given Stream.
    `IOStream<T>` | `wrap(java.util.stream.Stream<T> delegate)` Wraps a `Stream`.

    - ### Methods inherited from class org.apache.commons.io.function.IOBaseStreamAdapter

      `unwrap`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.commons.io.function.IOStream

      `allMatch, anyMatch, collect, collect, count, distinct, empty, filter, findAny, findFirst, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forAll, forAll, forEach, forEachOrdered, iterate, limit, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, of, of, of, peek, reduce, reduce, reduce, skip, sorted, sorted, toArray, toArray`

    - ### Methods inherited from interface org.apache.commons.io.function.IOBaseStream

      `asBaseStream, close, isParallel, iterator, onClose, parallel, sequential, spliterator, unordered, unwrap`

- - ### Method Detail

    - #### adapt

          static <T> IOStream<T> adapt(java.util.stream.Stream<T> delegate)

      Description copied from interface: `IOStream`
      Constructs a new IOStream for the given Stream.
      Specified by:
        `adapt` in interface `IOStream<T>`
      Type Parameters:
        `T` - the type of the stream elements.
      Parameters:
        `delegate` - The stream to delegate.
      Returns:
        a new IOStream.

    - #### wrap

          public IOStream<T> wrap(java.util.stream.Stream<T> delegate)

      Description copied from interface: `IOBaseStream`
      Wraps a `Stream`.
      Specified by:
        `wrap` in interface `IOBaseStream<T,IOStream<T>,java.util.stream.Stream<T>>`
      Parameters:
        `delegate` - The delegate.
      Returns:
        An IO stream.