Package-level declarations

Types

Link copied to clipboard
fun interface BytesReceiver
Link copied to clipboard
abstract class Downloader(indexFile: IndexFile, outputFile: File)
Link copied to clipboard
data class DownloadRequest @JvmOverloads constructor(val indexFile: IndexFile, val mirrors: List<Mirror>, val proxy: ProxyConfig? = null, val username: String? = null, val password: String? = null, val tryFirstMirror: Mirror? = null)
Link copied to clipboard
data class HeadInfo(val eTagChanged: Boolean, val eTag: String?, val contentLength: Long?, val lastModified: String?)
Link copied to clipboard
class HttpDownloader(httpManager: HttpManager, request: DownloadRequest, destFile: File) : Downloader

Download files over HTTP, with support for proxies, .onion addresses, HTTP Basic Auth, etc.

Link copied to clipboard
class HttpDownloaderV2(httpManager: HttpManager, request: DownloadRequest, destFile: File) : Downloader

Download files over HTTP, with support for proxies, .onion addresses, HTTP Basic Auth, etc.

Link copied to clipboard
open class HttpManager @JvmOverloads constructor(userAgent: String, queryString: String? = null, proxyConfig: ProxyConfig? = null, customDns: Dns? = null, mirrorParameterManager: MirrorParameterManager? = null, highTimeouts: Boolean = false, mirrorChooser: MirrorChooser = MirrorChooserWithParameters(mirrorParameterManager), httpClientEngineFactory: HttpClientEngineFactory<*> = getHttpClientEngineFactory( customDns ))
Link copied to clipboard
class HttpPoster(httpManager: HttpManager, url: String)

HTTP POST a JSON string to the URL configured in the constructor.

Link copied to clipboard
data class Mirror @JvmOverloads constructor(val baseUrl: String, val countryCode: String? = null, val isIpfsGateway: Boolean = false)
Link copied to clipboard
interface MirrorChooser
Link copied to clipboard

This is an interface for providing access to stored parameters for mirrors without adding additional dependencies. The expectation is that this will be used to store and retrieve data about mirror performance to use when ordering mirror for subsequent tests.

Link copied to clipboard

Thrown if we tried to resume a download, but the current mirror server does not offer resuming.

Link copied to clipboard

Thrown when a file was not found. Catching this is useful when checking if a new index version exists and then falling back to an older version.

Functions

Link copied to clipboard

Gets the InputStream for the given request as a DigestInputStream, so you can verify the SHA-256 hash. If you don't need to verify the hash, use getInputStream instead.

Link copied to clipboard