|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpFileDownloadTask
Interface that represents Task of downloading file - its downloading process.
Method Summary | |
---|---|
HttpDownloadClient |
getClient()
Client associated with current file - its HTTP connections are used to grab a file |
HttpFile |
getDownloadFile()
Returns file that is given to be downloaded |
boolean |
isTerminated()
Checks whether current downloading process has been stopped |
void |
saveToFile(InputStream inputStream)
Method that handles direct saving file onto physical disc. |
void |
sleep(int seconds)
Sets file download state to WAITING. |
Method Detail |
---|
HttpFile getDownloadFile()
HttpDownloadClient getClient()
void saveToFile(InputStream inputStream) throws Exception
inputStream
- - Http response stream, which contains data to be saved on the disk - should not be null
Exception
- Error during writing or if inputStream is nullvoid sleep(int seconds) throws InterruptedException
seconds
- time to sleep
InterruptedException
- if the thread was interrupted during sleepingboolean isTerminated()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |