Package ipsk.io

Class InterceptorInputStream

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

    public class InterceptorInputStream
    extends java.io.InputStream
    Author:
    klausj
    • Constructor Summary

      Constructors 
      Constructor Description
      InterceptorInputStream​(java.io.InputStream srcInputStream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addOutputStream​(IOutputStream os)
      Add output stream.
      void close()  
      int read()  
      int read​(byte[] buf)  
      int read​(byte[] buf, int offset, int len)  
      void removeOutputStream​(IOutputStream os)
      Remove output stream
      • Methods inherited from class java.io.InputStream

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

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

      • InterceptorInputStream

        public InterceptorInputStream​(java.io.InputStream srcInputStream)
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buf,
                        int offset,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buf)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • 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
      • addOutputStream

        public void addOutputStream​(IOutputStream os)
        Add output stream.
        Parameters:
        os - output stream
      • removeOutputStream

        public void removeOutputStream​(IOutputStream os)
        Remove output stream
        Parameters:
        os - output stream