Class DownloadThread

java.lang.Object
java.lang.Thread
fr.formiko.usuel.DownloadThread
All Implemented Interfaces:
Runnable

class DownloadThread extends Thread
Print info about curent download.
this thread watch file size & print it / fileSize.
Author:
Hydrolien
  • Field Details

    • fileOut

      private File fileOut
    • fileToDowloadSize

      private long fileToDowloadSize
    • running

      private boolean running
    • downloadName

      private String downloadName
  • Constructor Details

    • DownloadThread

      public DownloadThread(File fileOut, long fileToDowloadSize, String downloadName)
      Main constructor.
      Parameters:
      fileOut - file that we are curently filling by the downloading file
      fileToDowloadSize - size that we should reach when download will end
  • Method Details

    • stopRuning

      public void stopRuning()
    • run

      public void run()
      Main function that print every second %age of download done.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread