GlideUrl

open class GlideUrl : Key

A wrapper for strings representing http/https URLs responsible for ensuring URLs are properly escaped and avoiding unnecessary URL instantiations for loaders that require only string urls rather than URL objects.

Users wishing to replace the class for handling URLs must register a factory using GlideUrl.

To obtain a properly escaped URL, call toURL. To obtain a properly escaped string URL, call toStringUrl. To obtain a less safe, but less expensive to calculate cache key, call getCacheKey.

This class can also optionally wrap com.bumptech.glide.load.model.Headers for convenience.

Constructors

Link copied to clipboard
open fun GlideUrl(url: URL)
Link copied to clipboard
open fun GlideUrl(url: String)
Link copied to clipboard
open fun GlideUrl(url: URL, headers: Headers)
Link copied to clipboard
open fun GlideUrl(url: String, headers: Headers)

Functions

Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun getCacheKey(): String
Returns an inexpensive to calculate String suitable for use as a disk cache key.
Link copied to clipboard
open fun getHeaders(): Map<String, String>
Returns a non-null Map containing headers.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun toStringUrl(): String
Returns a properly escaped String url that can be used to make http/https requests.
Link copied to clipboard
open fun toURL(): URL
Link copied to clipboard
open fun updateDiskCacheKey(messageDigest: MessageDigest)
Adds all uniquely identifying information to the given digest.

Properties

Link copied to clipboard
val CHARSET: Charset
Link copied to clipboard
val STRING_CHARSET_NAME: String