Downloader

abstract class Downloader(indexFile: IndexFile, outputFile: File)

Inheritors

Constructors

Link copied to clipboard
constructor(indexFile: IndexFile, outputFile: File)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

If you ask for the cacheTag before calling download(), you will get the same one you passed in (if any). If you call it after download(), you will get the new cacheTag from the server, or null if there was none.

Functions

Link copied to clipboard

Cancel a running download, triggering an InterruptedException

Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract fun download()

Call this to start the download. Never call this more than once. Create a new Downloader, if you need to download again!

Link copied to clipboard
abstract fun hasChanged(): Boolean

After calling download, this returns true if a new file was downloaded and false if the file on the server has not changed and thus was not downloaded.

Link copied to clipboard