use of com.bumptech.glide.load.data.HttpUrlFetcher in project glide by bumptech.
the class HttpGlideUrlLoader method buildLoadData.
@Override
public LoadData<InputStream> buildLoadData(GlideUrl model, int width, int height, Options options) {
// GlideUrls memoize parsed URLs so caching them saves a few object instantiations and time
// spent parsing urls.
GlideUrl url = model;
if (modelCache != null) {
url = modelCache.get(model, 0, 0);
if (url == null) {
modelCache.put(model, 0, 0, model);
url = model;
}
}
int timeout = options.get(TIMEOUT);
return new LoadData<>(url, new HttpUrlFetcher(url, timeout));
}
Aggregations