|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.antelmann.net.JDownloader
public class JDownloader
Downloads a URL or URLCache object into a file in a thread using a ProgressMonitorInputStream, so that the user can abort if desired
Downloader,
JWebBrowser,
ProgressMonitorInputStream| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
JDownloader(Component parent,
URLCache uc,
File file)
|
|
JDownloader(Component parent,
URL url,
File file)
|
|
| Method Summary | |
|---|---|
static URL |
createFtpUrl(String host,
String remoteDir,
String name,
String user,
String password)
|
int |
getContentLength()
returns the content length of the URL once download started; returns -2 if the thread hasn't been started, yet, or -1 if the length is unknown. |
IOException |
getException()
if an IOException occurred during download, it can be later accessed through this method. |
File |
getFile()
|
int |
getReadSoFar()
returns the bytes that have been read by the thread; returns -3 if the thread hasn't been started, yet |
boolean |
getShowEndDialog()
returns true if the end-dialog is shown after download (true by default) |
URL |
getURL()
|
void |
run()
downloads the URL to the file and starts the ProgressMonitor |
void |
setBasicAuthorization(String user,
char[] password)
|
void |
setBasicAuthorization(String user,
String password)
|
void |
setShowEndDialog(boolean on)
|
| Methods inherited from class java.lang.Thread |
|---|
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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JDownloader(Component parent,
URL url,
File file)
public JDownloader(Component parent,
URLCache uc,
File file)
| Method Detail |
|---|
public void setBasicAuthorization(String user,
String password)
public void setBasicAuthorization(String user,
char[] password)
public boolean getShowEndDialog()
public void setShowEndDialog(boolean on)
public int getReadSoFar()
public URL getURL()
public File getFile()
public int getContentLength()
public IOException getException()
public void run()
run in interface Runnablerun in class Thread
public static URL createFtpUrl(String host,
String remoteDir,
String name,
String user,
String password)
throws MalformedURLException
MalformedURLException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||