|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bumptech.glide.load.model.stream.BaseGlideUrlLoader<T>
T
- The type of the model.public abstract class BaseGlideUrlLoader<T>
A base class for loading images over http/https. Can be subclassed for use with any model that can be translated
in to InputStream
data.
Constructor Summary | |
---|---|
BaseGlideUrlLoader(Context context)
|
|
BaseGlideUrlLoader(Context context,
ModelCache<T,GlideUrl> modelCache)
|
|
BaseGlideUrlLoader(ModelLoader<GlideUrl,InputStream> concreteLoader)
|
|
BaseGlideUrlLoader(ModelLoader<GlideUrl,InputStream> concreteLoader,
ModelCache<T,GlideUrl> modelCache)
|
Method Summary | |
---|---|
protected Headers |
getHeaders(T model,
int width,
int height)
Get the headers for the given model and dimensions as a map of strings to sets of strings. |
DataFetcher<InputStream> |
getResourceFetcher(T model,
int width,
int height)
Obtains an DataFetcher that can fetch the data required to decode the resource represented by this model. |
protected abstract String |
getUrl(T model,
int width,
int height)
Get a valid url http:// or https:// for the given model and dimensions as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseGlideUrlLoader(Context context)
public BaseGlideUrlLoader(Context context, ModelCache<T,GlideUrl> modelCache)
public BaseGlideUrlLoader(ModelLoader<GlideUrl,InputStream> concreteLoader)
public BaseGlideUrlLoader(ModelLoader<GlideUrl,InputStream> concreteLoader, ModelCache<T,GlideUrl> modelCache)
Method Detail |
---|
public DataFetcher<InputStream> getResourceFetcher(T 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<T,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.protected abstract String getUrl(T model, int width, int height)
model
- The model.width
- The width in pixels of the view/target the image will be loaded into.height
- The height in pixels of the view/target the image will be loaded into.
protected Headers getHeaders(T model, int width, int height)
model
- The model.width
- The width in pixels of the view/target the image will be loaded into.height
- The height in pixels of the view/target the image will be loaded into.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |