Package jadex.commons

Class ProtectedInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ProtectedInputStream
    extends ProxyInputStream
    Protects the underlying input stream from being closed.
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      ProtectedInputStream​(java.io.InputStream in)
      Create a protected input stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the stream.
      • Methods inherited from class java.io.FilterInputStream

        available, mark, markSupported, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProtectedInputStream

        public ProtectedInputStream​(java.io.InputStream in)
        Create a protected input stream.
        Parameters:
        in - The input stream.
    • Method Detail

      • close

        public void close()
        Close the stream. Replaces the underlying stream with an always closed version.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FilterInputStream