Package fr.formiko.usuel
Class DownloadThread
java.lang.Object
java.lang.Thread
fr.formiko.usuel.DownloadThread
- All Implemented Interfaces:
Runnable
Print info about curent download.
this thread watch file size & print it / fileSize.
this thread watch file size & print it / fileSize.
- Author:
- Hydrolien
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionDownloadThread(File fileOut, long fileToDowloadSize, String downloadName)
Main constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
Main function that print every second %age of download done.void
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
fileOut
-
fileToDowloadSize
private long fileToDowloadSize -
running
private boolean running -
downloadName
-
-
Constructor Details
-
DownloadThread
Main constructor.- Parameters:
fileOut
- file that we are curently filling by the downloading filefileToDowloadSize
- size that we should reach when download will end
-
-
Method Details