public static class FileProgress.Adapter extends java.lang.Object implements FileProgress
FileProgress.Adapter
Constructor and Description |
---|
Adapter() |
Modifier and Type | Method and Description |
---|---|
void |
cantDownloadFile()
Notifies progress that current retriever can't download this file
|
void |
errorOccurred(java.lang.Throwable e)
Notifies progress that an error occurred during download
|
void |
fileDownloaded()
Notifies progress that this file is downloaded
|
long |
getExpectedLength() |
long |
getTransferred() |
boolean |
isFinished() |
void |
setExpectedLength(long expectedLength)
Sets expected total size
|
void |
transferred(long count)
Increases total downloaded size by count
|
public void transferred(long count)
FileProgress
transferred
in interface FileProgress
count
- downloaded bytespublic void setExpectedLength(long expectedLength)
FileProgress
setExpectedLength
in interface FileProgress
expectedLength
- - expected length of the filepublic long getTransferred()
getTransferred
in interface FileProgress
public boolean isFinished()
isFinished
in interface FileProgress
public long getExpectedLength()
getExpectedLength
in interface FileProgress
public void cantDownloadFile()
FileProgress
cantDownloadFile
in interface FileProgress
public void fileDownloaded()
FileProgress
fileDownloaded
in interface FileProgress
public void errorOccurred(java.lang.Throwable e)
FileProgress
errorOccurred
in interface FileProgress
e
- - an error occurred during download