Class AbstractInputStream

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean closed
      Whether close() completed successfully.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractInputStream()
      Constructs a new instance for subclasses.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void checkOpen()
      Checks if this instance is closed and throws an IOException if so.
      void close()  
      boolean isClosed()
      Tests whether this instance is closed; if close() completed successfully.
      void setClosed​(boolean closed)
      Sets whether this instance is closed.
      • Methods inherited from class java.io.InputStream

        available, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • closed

        private boolean closed
        Whether close() completed successfully.
    • Constructor Detail

      • AbstractInputStream

        public AbstractInputStream()
        Constructs a new instance for subclasses.
    • Method Detail

      • checkOpen

        void checkOpen()
                throws java.io.IOException
        Checks if this instance is closed and throws an IOException if so.
        Throws:
        java.io.IOException - if this instance is closed.
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • isClosed

        public boolean isClosed()
        Tests whether this instance is closed; if close() completed successfully.
        Returns:
        whether this instance is closed.
      • setClosed

        public void setClosed​(boolean closed)
        Sets whether this instance is closed.
        Parameters:
        closed - whether this instance is closed.