public interface Download
| Modifier and Type | Interface and Description |
|---|---|
static class |
Download.State
The state of a download.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(Observer o)
A download can be observed for state changes.
|
void |
deleteObserver(Observer o)
A download can be observed for state changes.
|
Exception |
getCaughtException()
Returns the exception occurred while running this download.
|
int |
getDownloadsCompleted()
Returns the count of completed downloads this Download object encapsulates.
|
int |
getDownloadsErroneous()
Returns the count of erraneous downloads this Download object encapsulates.
|
int |
getDownloadsTotal()
Returns the count of downloads this Download object encapsulates.
|
JPanel |
getExceptionPanel(Exception exception)
Returns a JPanel which visualizes the given exception.
|
File |
getFileToSaveTo()
Returns the File object pointing to the destination download location.
|
default int |
getProgress()
If the state can be set to RUNNING_WITH_PROGRESS, than this method should be implemented and should return the
current progress in percent.
|
Download.State |
getStatus()
Returns the current state of the download.
|
String |
getTitle()
Returns the title of the Download.
|
void |
startDownload()
Notifies the download that it should start.
|
void startDownload()
Download.State getStatus()
default int getProgress()
void addObserver(Observer o)
o - An observer to add.void deleteObserver(Observer o)
o - The observer to remove.int getDownloadsTotal()
int getDownloadsCompleted()
int getDownloadsErroneous()
File getFileToSaveTo()
Exception getCaughtException()
Should be changed in future releases to Map
String getTitle()
Copyright © 2012–2026 cismet GmbH. All rights reserved.