Class CefriumProfile.Download
java.lang.Object
com.cefrium.CefriumProfile.Download
- Enclosing class:
CefriumProfile
A download of this profile as it was when reported. Downloads of a
persistent profile are kept by the engine across runs, so the list
includes earlier runs' downloads; one the app was closed in the middle
of comes back interrupted, and can be resumed if the server allows it.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancancel()Cancels it and deletes the partial file.booleanPaused, or interrupted in a way it can continue from.longMilliseconds since the epoch; 0 while it has not ended.getGuid()Identifies the download in this profile, across runs.intCEFcef_download_interrupt_reason_t; 0 if none.getPath()Where the file is saved; empty before that is decided.The profile it belongs to.longlongMilliseconds since the epoch.intgetState()One of theDOWNLOAD_*states.long-1 or 0 if the server did not say.getUrl()booleanisPaused()booleanpause()booleanremove()Removes it from the list.booleanresume()Continues a paused or interrupted download; false if it cannot.
-
Method Details
-
getGuid
Identifies the download in this profile, across runs. -
getUrl
-
getPath
Where the file is saved; empty before that is decided. -
getMimeType
-
getState
public int getState()One of theDOWNLOAD_*states. -
getInterruptReason
public int getInterruptReason()CEFcef_download_interrupt_reason_t; 0 if none. -
getReceivedBytes
public long getReceivedBytes() -
getTotalBytes
public long getTotalBytes()-1 or 0 if the server did not say. -
getStartTime
public long getStartTime()Milliseconds since the epoch. -
getEndTime
public long getEndTime()Milliseconds since the epoch; 0 while it has not ended. -
isPaused
public boolean isPaused() -
canResume
public boolean canResume()Paused, or interrupted in a way it can continue from. -
getProfile
The profile it belongs to. -
cancel
public boolean cancel()Cancels it and deletes the partial file. -
pause
public boolean pause() -
resume
public boolean resume()Continues a paused or interrupted download; false if it cannot. -
remove
public boolean remove()Removes it from the list. The file is kept.
-