Class HttpDownloader


  • public final class HttpDownloader
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int INTERVAL  
      java.lang.Thread thread  
      java.util.concurrent.atomic.AtomicInteger writed  
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpDownloader​(java.net.URL url, java.nio.file.Path file)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void downloadFile​(java.net.URL url, java.nio.file.Path file, java.util.function.Consumer<java.lang.Integer> chanheTrack)  
      static void downloadZip​(java.net.URL url, java.nio.file.Path dir)  
      java.lang.String getFilename()  
      • Methods inherited from class java.lang.Object

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

      • writed

        public final java.util.concurrent.atomic.AtomicInteger writed
      • thread

        public final java.lang.Thread thread
    • Constructor Detail

      • HttpDownloader

        public HttpDownloader​(java.net.URL url,
                              java.nio.file.Path file)
    • Method Detail

      • downloadFile

        public static void downloadFile​(java.net.URL url,
                                        java.nio.file.Path file,
                                        java.util.function.Consumer<java.lang.Integer> chanheTrack)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • downloadZip

        public static void downloadZip​(java.net.URL url,
                                       java.nio.file.Path dir)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getFilename

        public java.lang.String getFilename()