Class CefriumProfile.Download

java.lang.Object
com.cefrium.CefriumProfile.Download
Enclosing class:
CefriumProfile

public final class CefriumProfile.Download extends Object
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 Details

    • getGuid

      public String getGuid()
      Identifies the download in this profile, across runs.
    • getUrl

      public String getUrl()
    • getPath

      public String getPath()
      Where the file is saved; empty before that is decided.
    • getMimeType

      public String getMimeType()
    • getState

      public int getState()
      One of the DOWNLOAD_* states.
    • getInterruptReason

      public int getInterruptReason()
      CEF cef_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

      public CefriumProfile 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.