Methods Summary |
---|
public void | cancel()Cancels the download.
|
public boolean | getDeleteFileOnCancel()
|
public int | getDownloadState()Gets the state of the TorrentDownloader.
|
public java.lang.String | getError()Returns the error string if one occured, "Ok" otherwise.
|
public java.io.File | getFile()Returns the File the TorrentDownloader downloads to.
|
public byte[] | getLastReadBytes()
|
public int | getLastReadCount()
|
public int | getPercentDone()Returns the amount downloaded in per cent. Gives -1 if total size is not available.
|
public java.lang.String | getStatus()
|
public int | getTotalRead()Returns the amount downloaded in bytes.
|
public java.lang.String | getURL()Returns the URL downloaded from.
|
public void | setDeleteFileOnCancel(boolean deleteFileOnCancel)
|
public void | setDownloadPath(java.lang.String path, java.lang.String file)Changes the path and filename to download to.
You can give 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.
|
public void | start()Starts the download.
|