|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TorrentDownloader
Field Summary | |
---|---|
static int |
STATE_CANCELLED
|
static int |
STATE_DOWNLOADING
|
static int |
STATE_DUPLICATE
|
static int |
STATE_ERROR
|
static int |
STATE_FINISHED
|
static int |
STATE_INIT
|
static int |
STATE_NON_INIT
|
static int |
STATE_START
|
Method Summary | |
---|---|
void |
cancel()
Cancels the download. |
boolean |
getDeleteFileOnCancel()
|
int |
getDownloadState()
Gets the state of the TorrentDownloader. |
String |
getError()
Returns the error string if one occured, "Ok" otherwise. |
File |
getFile()
Returns the File the TorrentDownloader downloads to. |
byte[] |
getLastReadBytes()
|
int |
getLastReadCount()
|
int |
getPercentDone()
Returns the amount downloaded in per cent. |
String |
getStatus()
|
int |
getTotalRead()
Returns the amount downloaded in bytes. |
String |
getURL()
Returns the URL downloaded from. |
boolean |
isIgnoreReponseCode()
|
void |
setDeleteFileOnCancel(boolean deleteFileOnCancel)
|
void |
setDownloadPath(String path,
String file)
Changes the path and filename to download to. |
void |
setIgnoreReponseCode(boolean ignoreReponseCode)
|
void |
start()
Starts the download. |
Field Detail |
---|
static final int STATE_NON_INIT
static final int STATE_INIT
static final int STATE_START
static final int STATE_DOWNLOADING
static final int STATE_FINISHED
static final int STATE_ERROR
static final int STATE_DUPLICATE
static final int STATE_CANCELLED
Method Detail |
---|
void start()
void cancel()
void setDownloadPath(String path, String file)
null
for either to leave it as is.
(These are initialized to either the path/filename given via
TorrentDownloaderFactory.download(Managed)
or to
the default torrent save directory (path) and the filename the
server proposes (file).
This function does nothing after the download has been started.
path
- The path for download.file
- The file name for download.int getDownloadState()
File getFile()
File
the TorrentDownloader downloads to.
int getPercentDone()
int getTotalRead()
String getError()
String getStatus()
String getURL()
int getLastReadCount()
byte[] getLastReadBytes()
boolean getDeleteFileOnCancel()
void setDeleteFileOnCancel(boolean deleteFileOnCancel)
deleteFileOnCancel
- boolean isIgnoreReponseCode()
void setIgnoreReponseCode(boolean ignoreReponseCode)
ignoreReponseCode
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |