Module tvbrowser

Class ProgressInputStream

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

    public class ProgressInputStream
    extends java.io.FilterInputStream
    This inputstream can display the current position of a file using a ProgressMonitor.
    Since:
    2.7
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      int getCurrentPosition()  
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      long skip​(long n)  
      • Methods inherited from class java.io.FilterInputStream

        available, mark, markSupported, reset
      • 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

      • ProgressInputStream

        public ProgressInputStream​(java.io.InputStream in,
                                   ProgressMonitor monitor)
        Creates the Stream
        Parameters:
        in - the underlying input stream
        monitor - display the progress in this monitor
      • ProgressInputStream

        public ProgressInputStream​(java.io.InputStream in,
                                   ProgressMonitor monitor,
                                   int position)
        Creates the Stream
        Parameters:
        in - the underlying input stream
        monitor - display the progress in this monitor
        position - start at this position
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.FilterInputStream
        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.FilterInputStream
        Throws:
        java.io.IOException
      • getCurrentPosition

        public int getCurrentPosition()