Class ObservableInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class ObservableInputStream
    extends FilterInputStream
    An input stream which can be used to observer progress of reading from some other input stream.
    • Constructor Detail

      • ObservableInputStream

        public ObservableInputStream​(InputStream in,
                                     InputStreamObserver listener)
        Constructs an object to observer the progress of an input stream.
        Parameters:
        in - The input stream to be monitored.
        listener - the listener to be informed
      • ObservableInputStream

        public ObservableInputStream​(InputStream in,
                                     long size,
                                     InputStreamObserver listener)
        Constructs an object to observer the progress of an input stream.
        Parameters:
        in - The input stream to be monitored.
        listener - the listener to be informed