Class ASInputStream

    • Field Detail

      • isClosed

        protected boolean isClosed
      • isSourceClosed

        protected boolean isSourceClosed
    • Constructor Detail

      • ASInputStream

        public ASInputStream()
    • Method Detail

      • closeResource

        public abstract void closeResource()
                                    throws IOException
        Closes stream resource. There is a difference between closing stream and closing it's resource. Several streams may have the same resource (e. g. the same file stream) and resource should be closed only after all streams using it are closed.
        Throws:
        IOException
      • incrementResourceUsers

        public abstract void incrementResourceUsers()
        Method increments number of resource users. {@see closeResource}
      • decrementResourceUsers

        public abstract void decrementResourceUsers()
        Method decrements number of resource users. {@see closeResource}
      • createStreamFromStream

        public static ASInputStream createStreamFromStream​(ASInputStream stream)
        Creates copy of stream. The two streams can be closed separately.