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.
  • 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:
      loadData in interface com.bumptech.glide.load.data.DataFetcher<InputStream>
    • onFailure

      public void onFailure(@NonNull okhttp3.Call call, @NonNull IOException e)
      Specified by:
      onFailure in interface okhttp3.Callback
    • onResponse

      public void onResponse(@NonNull okhttp3.Call call, @NonNull okhttp3.Response response)
      Specified by:
      onResponse in interface okhttp3.Callback
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in interface com.bumptech.glide.load.data.DataFetcher<InputStream>
    • cancel

      public void cancel()
      Specified by:
      cancel in interface com.bumptech.glide.load.data.DataFetcher<InputStream>
    • getDataClass

      @NonNull public Class<InputStream> getDataClass()
      Specified by:
      getDataClass in interface com.bumptech.glide.load.data.DataFetcher<InputStream>
    • getDataSource

      @NonNull public com.bumptech.glide.load.DataSource getDataSource()
      Specified by:
      getDataSource in interface com.bumptech.glide.load.data.DataFetcher<InputStream>