Downloader

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

Constructors

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

Types

Link copied to clipboard
object Companion

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

Properties

Link copied to clipboard
var cacheTag: String? = null

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.

Inheritors

Link copied to clipboard
Link copied to clipboard