Class IOBaseStreamAdapter<T,S extends IOBaseStream<T,S,B>,B extends BaseStream<T,B>>

java.lang.Object
org.apache.commons.io.function.IOBaseStreamAdapter<T,S,B>
Type Parameters:
T - the type of the stream elements.
S - the type of the stream extending IOBaseStream.
All Implemented Interfaces:
Closeable, AutoCloseable, IOBaseStream<T,S,B>
Direct Known Subclasses:
IOStreamAdapter

abstract class IOBaseStreamAdapter<T,S extends IOBaseStream<T,S,B>,B extends BaseStream<T,B>> extends Object implements IOBaseStream<T,S,B>
Abstracts an IOBaseStream implementation. Keep package-private for now.
  • Field Details

    • delegate

      private final B extends BaseStream<T,B> delegate
      The underlying base stream.
  • Constructor Details

    • IOBaseStreamAdapter

      IOBaseStreamAdapter(B delegate)
      Constructs an instance.
      Parameters:
      delegate - the delegate.
  • Method Details

    • unwrap

      public B unwrap()
      Description copied from interface: IOBaseStream
      Unwraps this instance and returns the underlying Stream.

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

      Specified by:
      unwrap in interface IOBaseStream<T,S extends IOBaseStream<T,S,B>,B extends BaseStream<T,B>>
      Returns:
      the underlying stream.