org.eclipse.rdf4j.common.io

## Class UncloseableInputStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - org.eclipse.rdf4j.common.io.UncloseableInputStream

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class UncloseableInputStream
      extends FilterInputStream

  A wrapper for an input stream to avoid allowing libraries to close input streams unexpectedly using the `close()` method. Instead, they must be closed by the creator using `doClose()`.
  Author:
    Peter Ansell

- - ### Field Summary

    - ### Fields inherited from class java.io.FilterInputStream

      `in`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UncloseableInputStream(InputStream parent)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `doClose()` Invoke close on FilterInputStream parent class.

    - ### Methods inherited from class java.io.FilterInputStream

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

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

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

- - ### Constructor Detail

    - #### UncloseableInputStream

          public UncloseableInputStream(InputStream parent)

      Constructor
      Parameters:
        `parent` - input stream

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `FilterInputStream`
      Throws:
        `IOException`

    - #### doClose

          public void doClose()
                       throws IOException

      Invoke close on FilterInputStream parent class.
      Throws:
        `IOException`

Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.