ByteArrayLoader

open class ByteArrayLoader<Data> : ModelLoader<Model, Data>

A base class to convert byte arrays to input streams so they can be decoded. This class is abstract because there is no simple/quick way to generate an id from the bytes themselves, so subclass must include an id.

Parameters

<Data>

The type of data that will be loaded from a given byte array.

Constructors

Link copied to clipboard
open fun ByteArrayLoader(converter: ByteArrayLoader.Converter<Data>)

Types

Link copied to clipboard
open class ByteBufferFactory : ModelLoaderFactory<T, Y>
Link copied to clipboard
interface Converter<Data>
Converts between a byte array a desired model class.
Link copied to clipboard
open class StreamFactory : ModelLoaderFactory<T, Y>

Functions

Link copied to clipboard
open fun buildLoadData(    model: Array<Byte>,     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: Array<Byte>): Boolean
Returns true if the given model is a of a recognized type that this loader can probably load.