public class Download extends AbstractMonitorableTask
Thread.State, Thread.UncaughtExceptionHandler
taskStatus
cancellationRequested
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
Download() |
Download(SimpleTaskStatus taskStatus) |
Modifier and Type | Method and Description |
---|---|
static boolean |
acceptableFileSize(File f,
int estimated_size)
URLConnection 's method getContentLength() does not give
exact size. |
File |
downloadFile(URL url,
String defaultFileName) |
cancelRequest, getSimpleTaskStatus, getTaskStatus, setTaskName
isCancellationRequested
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isCancellationRequested
public Download(SimpleTaskStatus taskStatus)
taskName
- public Download()
public File downloadFile(URL url, String defaultFileName) throws IOException
IOException
public static boolean acceptableFileSize(File f, int estimated_size)
URLConnection
's method getContentLength() does not give
exact size.