Class ProgressBarInputStream

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

    public class ProgressBarInputStream
    extends java.io.InputStream
    • Constructor Detail

      • ProgressBarInputStream

        public ProgressBarInputStream​(IConsole console,
                                      java.io.InputStream wrapped,
                                      long length)
      • ProgressBarInputStream

        public ProgressBarInputStream​(ConsoleProgressBarAnimation progressBarAnimation,
                                      java.io.InputStream wrapped)
    • Method Detail

      • wrapDownload

        public static java.io.InputStream wrapDownload​(IConsole console,
                                                       java.net.URL url)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • read

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

        public int read​(@NotNull
                        @org.jetbrains.annotations.NotNull byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(@NotNull
                        @org.jetbrains.annotations.NotNull byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.InputStream
        Throws:
        java.io.IOException
      • getWrapped

        @NotNull
        public @NotNull java.io.InputStream getWrapped()
      • 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