Class ReleasableInputStream

    • Constructor Detail

      • ReleasableInputStream

        protected ReleasableInputStream​(InputStream is)
        This constructor is not meant to be used directly. Use wrap(InputStream) instead.
    • Method Detail

      • close

        public final void close()
        If closeDisabled is false, closes this input stream and releases any system resources associated with the stream. Otherwise, this method does nothing.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Overrides:
        close in class SdkFilterInputStream
      • isCloseDisabled

        public final boolean isCloseDisabled()
        Returns true if the close method has been disabled; false otherwise. Once the close method is disabled, caller would be responsible to release resources via release().
      • disableClose

        public final <T extends ReleasableInputStream> T disableClose()
        Used to disable the close method. Once the close method is disabled, caller would be responsible to release resources via release().