|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.gudy.azureus2.core3.util.AEThread org.gudy.azureus2.core3.torrentdownloader.impl.TorrentDownloaderImpl
public class TorrentDownloaderImpl
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 |
Fields inherited from interface org.gudy.azureus2.core3.torrentdownloader.TorrentDownloader |
---|
STATE_CANCELLED, STATE_DOWNLOADING, STATE_DUPLICATE, STATE_ERROR, STATE_FINISHED, STATE_INIT, STATE_NON_INIT, STATE_START |
Constructor Summary | |
---|---|
TorrentDownloaderImpl()
|
Method Summary | |
---|---|
void |
cancel()
Cancels the download. |
protected void |
closeConnection()
|
boolean |
equals(Object obj)
|
boolean |
getDeleteFileOnCancel()
|
int |
getDownloadState()
Gets the state of the TorrentDownloader. |
String |
getError()
Returns the error string if one occured, "Ok" otherwise. |
int |
getErrorCode()
|
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. |
int |
hashCode()
|
void |
init(TorrentDownloaderCallBackInterface _iface,
String _url,
Proxy _proxy,
String _referrer,
Map _request_properties,
String _file)
|
boolean |
isIgnoreReponseCode()
|
void |
notifyListener()
|
void |
runSupport()
|
void |
setDeleteFileOnCancel(boolean deleteFileOnCancel)
|
void |
setDownloadPath(String path,
String file)
Changes the path and filename to download to. |
void |
setDownloadState(int state)
|
void |
setError(int errCode,
String err)
|
void |
setIgnoreReponseCode(boolean ignoreReponseCode)
|
protected void |
setStatus(String str)
|
Methods inherited from class org.gudy.azureus2.core3.util.AEThread |
---|
isOurThread, run, setOurThread, setOurThread |
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 |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.gudy.azureus2.core3.torrentdownloader.TorrentDownloader |
---|
start |
Constructor Detail |
---|
public TorrentDownloaderImpl()
Method Detail |
---|
public void init(TorrentDownloaderCallBackInterface _iface, String _url, Proxy _proxy, String _referrer, Map _request_properties, String _file)
public void notifyListener()
public void runSupport()
runSupport
in class AEThread
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getError()
TorrentDownloader
getError
in interface TorrentDownloader
public void setError(int errCode, String err)
public int getErrorCode()
protected void setStatus(String str)
public String getStatus()
getStatus
in interface TorrentDownloader
public File getFile()
TorrentDownloader
File
the TorrentDownloader downloads to.
getFile
in interface TorrentDownloader
public int getPercentDone()
TorrentDownloader
getPercentDone
in interface TorrentDownloader
public int getDownloadState()
TorrentDownloader
getDownloadState
in interface TorrentDownloader
public void setDownloadState(int state)
public String getURL()
TorrentDownloader
getURL
in interface TorrentDownloader
public void cancel()
TorrentDownloader
cancel
in interface TorrentDownloader
protected void closeConnection()
public void setDownloadPath(String path, String file)
TorrentDownloader
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.
setDownloadPath
in interface TorrentDownloader
path
- The path for download.file
- The file name for download.public int getTotalRead()
TorrentDownloader
getTotalRead
in interface TorrentDownloader
public byte[] getLastReadBytes()
getLastReadBytes
in interface TorrentDownloader
public int getLastReadCount()
getLastReadCount
in interface TorrentDownloader
public void setDeleteFileOnCancel(boolean deleteFileOnCancel)
setDeleteFileOnCancel
in interface TorrentDownloader
public boolean getDeleteFileOnCancel()
getDeleteFileOnCancel
in interface TorrentDownloader
public boolean isIgnoreReponseCode()
isIgnoreReponseCode
in interface TorrentDownloader
public void setIgnoreReponseCode(boolean ignoreReponseCode)
setIgnoreReponseCode
in interface TorrentDownloader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |