public class StreamByteArrayLoader extends Object implements StreamModelLoader<byte[]>
Modifier and Type | Class and Description |
---|---|
static class |
StreamByteArrayLoader.Factory
Factory for
StreamByteArrayLoader . |
Constructor and Description |
---|
StreamByteArrayLoader() |
StreamByteArrayLoader(String id)
Deprecated.
Use
GenericRequestBuilder.signature(com.bumptech.glide.load.Key)
and the empty constructor instead. Scheduled to be removed in Glide 4.0. |
Modifier and Type | Method and Description |
---|---|
DataFetcher<InputStream> |
getResourceFetcher(byte[] model,
int width,
int height)
Obtains an
DataFetcher that can fetch the data required to decode the resource represented by this model. |
public StreamByteArrayLoader()
@Deprecated public StreamByteArrayLoader(String id)
GenericRequestBuilder.signature(com.bumptech.glide.load.Key)
and the empty constructor instead. Scheduled to be removed in Glide 4.0.public DataFetcher<InputStream> getResourceFetcher(byte[] model, int width, int height)
ModelLoader
DataFetcher
that can fetch the data required to decode the resource represented by this model.
The DataFetcher
will not be used if the resource is already cached.
Note - If no valid data fetcher can be returned (for example if a model has a null URL), then it is acceptable to return a null data fetcher from this method. Doing so will be treated any other failure or exception during the load process.
getResourceFetcher
in interface ModelLoader<byte[],InputStream>
model
- The model representing the resource.width
- The width in pixels of the view or target the resource will be loaded into, or
Target.SIZE_ORIGINAL
to indicate that the resource should
be loaded at its original width.height
- The height in pixels of the view or target the resource will be loaded into, or
Target.SIZE_ORIGINAL
to indicate that the resource should
be loaded at its original height.DataFetcher
that can obtain the data the resource can be decoded from if the resource is not
cached, or null if no valid DataFetcher
could be constructed.