|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolution.player.core.network.FileTransfer
com.evolution.player.core.network.Download
public abstract class Download
Description of a download.
Clients can implement.
IDownloadManager
Constructor Summary | |
---|---|
Download(MediaInfo media)
Create a new download downloading the given media. |
Method Summary | |
---|---|
abstract LocalMediaInfo |
download(IProgressMonitor monitor)
Download FileTransfer.getMediaInfo() and return the downloaded media if the
download succeeded, throws IOException if the download failed, returns
null if the monitor was canceled. |
int |
getLength()
The length of the file to transfer in bytes. |
int |
getPercentage()
The percentage transfered so far. |
double |
getSpeed()
The current speed of the download in KB per second if know. |
int |
getTransfered()
The amount of bytes transfered so far. |
Methods inherited from class com.evolution.player.core.network.FileTransfer |
---|
getMediaInfo |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Download(MediaInfo media)
media
- the media to downloadMethod Detail |
---|
public abstract LocalMediaInfo download(IProgressMonitor monitor) throws java.io.IOException
FileTransfer.getMediaInfo()
and return the downloaded media if the
download succeeded, throws IOException if the download failed, returns
null if the monitor was canceled.
monitor
- a monitor to report progress to and the check for cancelation
java.io.IOException
- if something went wrong during the downloadpublic double getSpeed()
FileTransfer
getSpeed
in class FileTransfer
public int getLength()
FileTransfer
getLength
in class FileTransfer
public int getPercentage()
FileTransfer
getPercentage
in class FileTransfer
public int getTransfered()
FileTransfer
getTransfered
in class FileTransfer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |