DataUrlLoader

class DataUrlLoader<Model, Data> : ModelLoader<Model, Data>

A simple model loader for loading data from a Data URL String.

Data URIs use the "data" scheme.

See http://www.ietf.org/rfc/rfc2397.txt for a complete description of the 'data' URL scheme.

Briefly, a 'data' URL has the form:

data:[mediatype][;base64],some_data

Parameters

<Model>

The type of Model that we can retrieve data for, e.g. String.

<Data>

The type of data that can be opened, e.g. InputStream.

Constructors

Link copied to clipboard
open fun DataUrlLoader(dataDecoder: DataUrlLoader.DataDecoder<Data>)

Types

Link copied to clipboard
interface DataDecoder<Data>
Allows decoding a specific type of data from a Data URL String.
Link copied to clipboard
class StreamFactory<Model> : ModelLoaderFactory<T, Y>
Factory for loading InputStreams from data uris.

Functions

Link copied to clipboard
open fun buildLoadData(    model: Model,     width: Int,     height: Int,     options: Options): ModelLoader.LoadData<Data>
Returns a com.bumptech.glide.load.model.ModelLoader.LoadData containing a required to decode the resource represented by this model, as well as a set of Keys that identify the data loaded by the com.bumptech.glide.load.data.DataFetcher as well as an optional list of alternate keys from which equivalent data can be loaded.
Link copied to clipboard
open fun handles(model: Model): Boolean
Returns true if the given model is a of a recognized type that this loader can probably load.