Class FileDownloader


  • public class FileDownloader
    extends java.lang.Object
    A simple file downloading class This is not Async so do that your self
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDownloader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FileDownloader downloadFile​(java.net.URL url, java.io.File dest)
      Download a file
      • Methods inherited from class java.lang.Object

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

      • FileDownloader

        public FileDownloader()
    • Method Detail

      • downloadFile

        public FileDownloader downloadFile​(java.net.URL url,
                                           java.io.File dest)
                                    throws java.io.IOException
        Download a file
        Parameters:
        url - The URL of the file
        dest - Where you want the file saved
        Returns:
        returns itself since it's an initializer
        Throws:
        java.io.IOException - if the download fails