Interface DownloadUpdated
- All Superinterfaces:
DownloadEvent
,Event
An event indicating that the download has been updated.
-
Method Summary
Modifier and TypeMethodDescriptiondefault long
Returns the current download speed estimate in bytes/second.default Download
download()
Returns theDownload
instance initiated this event.progress()
Returns anOptional
containing the rough percent complete or an emptyOptional
if we do not know it, because we did not receive the total size.default long
Returns the number or received (downloaded) bytes.default long
Returns the total size of the downloaded file in bytes.
-
Method Details
-
download
Description copied from interface:DownloadEvent
Returns theDownload
instance initiated this event.- Specified by:
download
in interfaceDownloadEvent
-
currentSpeed
default long currentSpeed()Returns the current download speed estimate in bytes/second. -
totalBytes
default long totalBytes()Returns the total size of the downloaded file in bytes. -
receivedBytes
default long receivedBytes()Returns the number or received (downloaded) bytes. -
progress
Returns anOptional
containing the rough percent complete or an emptyOptional
if we do not know it, because we did not receive the total size.
-