Class Downloader

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

    public class Downloader
    extends java.lang.Object
    implements java.io.Closeable
    Generic concurrent file downloader which uses Java NIO channels to potentially leverage OS internal optimizations.
    • Constructor Summary

      Constructors 
      Constructor Description
      Downloader​(int concurrency, int connectTimeoutMs, int readTimeoutMs)  
      Downloader​(int concurrency, int connectTimeoutMs, int readTimeoutMs, int maxRetries, long retryInitialInterval, boolean failOnError, int slowLogThreshold, java.lang.String checksumAlgorithm, int bufferSize)  
    • Constructor Detail

      • Downloader

        public Downloader​(int concurrency,
                          int connectTimeoutMs,
                          int readTimeoutMs)
      • Downloader

        public Downloader​(int concurrency,
                          int connectTimeoutMs,
                          int readTimeoutMs,
                          int maxRetries,
                          long retryInitialInterval,
                          boolean failOnError,
                          int slowLogThreshold,
                          java.lang.String checksumAlgorithm,
                          int bufferSize)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException