Package ghidra.app.util.bin

# Class ByteProviderInputStream.ClosingInputStream

java.lang.Object
java.io.InputStream
ghidra.app.util.bin.ByteProviderInputStream
ghidra.app.util.bin.ByteProviderInputStream.ClosingInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

Enclosing class:
  ByteProviderInputStream

public static class ByteProviderInputStream.ClosingInputStream extends ByteProviderInputStream
An `InputStream` that reads from a `ByteProvider`, and DOES `close()` the underlying ByteProvider when closed itself.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ghidra.app.util.bin.ByteProviderInputStream

  `ByteProviderInputStream.ClosingInputStream`

- ## Field Summary

  ### Fields inherited from class ghidra.app.util.bin.ByteProviderInputStream

  `provider`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClosingInputStream(ByteProvider provider)`
  Creates an `InputStream` that reads from a `ByteProvider`, that DOES `close()` the underlying ByteProvider when closed itself.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`

  ### Methods inherited from class ghidra.app.util.bin.ByteProviderInputStream

  `available, mark, markSupported, read, read, reset, skip`

  ### Methods inherited from class java.io.InputStream

  `nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo`

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

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

- ## Constructor Details

  - ### ClosingInputStream

    public ClosingInputStream(ByteProvider provider)
    Creates an `InputStream` that reads from a `ByteProvider`, that DOES `close()` the underlying ByteProvider when closed itself.

    Parameters:
      `provider` - the `ByteProvider` to read from (and close)

- ## Method Details

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Overrides:
      `close` in class `ByteProviderInputStream`
    Throws:
      `IOException`