Class OkHttpStreamFetcher
java.lang.Object
com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher
- All Implemented Interfaces:
com.bumptech.glide.load.data.DataFetcher<InputStream>,okhttp3.Callback
public class OkHttpStreamFetcher
extends Object
implements com.bumptech.glide.load.data.DataFetcher<InputStream>, okhttp3.Callback
Fetches an
InputStream using the okhttp library.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.bumptech.glide.load.data.DataFetcher
com.bumptech.glide.load.data.DataFetcher.DataCallback<T extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionOkHttpStreamFetcher(okhttp3.Call.Factory client, com.bumptech.glide.load.model.GlideUrl url) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidcleanup()com.bumptech.glide.load.DataSourcevoidloadData(com.bumptech.glide.Priority priority, com.bumptech.glide.load.data.DataFetcher.DataCallback<? super InputStream> callback) voidonFailure(okhttp3.Call call, IOException e) voidonResponse(okhttp3.Call call, okhttp3.Response response)
-
Constructor Details
-
OkHttpStreamFetcher
public OkHttpStreamFetcher(okhttp3.Call.Factory client, com.bumptech.glide.load.model.GlideUrl url)
-
-
Method Details
-
loadData
public void loadData(@NonNull com.bumptech.glide.Priority priority, @NonNull com.bumptech.glide.load.data.DataFetcher.DataCallback<? super InputStream> callback) - Specified by:
loadDatain interfacecom.bumptech.glide.load.data.DataFetcher<InputStream>
-
onFailure
- Specified by:
onFailurein interfaceokhttp3.Callback
-
onResponse
public void onResponse(@NonNull okhttp3.Call call, @NonNull okhttp3.Response response) - Specified by:
onResponsein interfaceokhttp3.Callback
-
cleanup
public void cleanup()- Specified by:
cleanupin interfacecom.bumptech.glide.load.data.DataFetcher<InputStream>
-
cancel
public void cancel()- Specified by:
cancelin interfacecom.bumptech.glide.load.data.DataFetcher<InputStream>
-
getDataClass
- Specified by:
getDataClassin interfacecom.bumptech.glide.load.data.DataFetcher<InputStream>
-
getDataSource
@NonNull public com.bumptech.glide.load.DataSource getDataSource()- Specified by:
getDataSourcein interfacecom.bumptech.glide.load.data.DataFetcher<InputStream>
-