FileDocCategorySizeDatePackage
TorrentDownloader.javaAPI DocAzureus 3.0.3.43275Thu Dec 14 14:53:10 GMT 2006org.gudy.azureus2.core3.torrentdownloader

TorrentDownloader

public interface TorrentDownloader
author
Tobias Minich

Fields Summary
public static final int
STATE_NON_INIT
public static final int
STATE_INIT
public static final int
STATE_START
public static final int
STATE_DOWNLOADING
public static final int
STATE_FINISHED
public static final int
STATE_ERROR
public static final int
STATE_DUPLICATE
public static final int
STATE_CANCELLED
Constructors Summary
Methods Summary
public voidcancel()
Cancels the download.

public booleangetDeleteFileOnCancel()

return

public intgetDownloadState()
Gets the state of the TorrentDownloader.

public java.lang.StringgetError()
Returns the error string if one occured, "Ok" otherwise.

public java.io.FilegetFile()
Returns the File the TorrentDownloader downloads to.

public byte[]getLastReadBytes()

return

public intgetLastReadCount()

return

public intgetPercentDone()
Returns the amount downloaded in per cent. Gives -1 if total size is not available.

public java.lang.StringgetStatus()

public intgetTotalRead()
Returns the amount downloaded in bytes.

public java.lang.StringgetURL()
Returns the URL downloaded from.

public voidsetDeleteFileOnCancel(boolean deleteFileOnCancel)

param
deleteFileOnCancel

public voidsetDownloadPath(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.

param
path The path for download.
param
file The file name for download.

public voidstart()
Starts the download.