Class OkHttpStreamFetcher

  • All Implemented Interfaces:
    com.bumptech.glide.load.data.DataFetcher<java.io.InputStream>, okhttp3.Callback

    public class OkHttpStreamFetcher
    extends java.lang.Object
    implements com.bumptech.glide.load.data.DataFetcher<java.io.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 java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      OkHttpStreamFetcher​(okhttp3.Call.Factory client, com.bumptech.glide.load.model.GlideUrl url)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()  
      void cleanup()  
      java.lang.Class<java.io.InputStream> getDataClass()  
      com.bumptech.glide.load.DataSource getDataSource()  
      void loadData​(com.bumptech.glide.Priority priority, com.bumptech.glide.load.data.DataFetcher.DataCallback<? super java.io.InputStream> callback)  
      void onFailure​(okhttp3.Call call, java.io.IOException e)  
      void onResponse​(okhttp3.Call call, okhttp3.Response response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OkHttpStreamFetcher

        public OkHttpStreamFetcher​(okhttp3.Call.Factory client,
                                   com.bumptech.glide.load.model.GlideUrl url)
    • Method Detail

      • loadData

        public void loadData​(@NonNull
                             com.bumptech.glide.Priority priority,
                             @NonNull
                             com.bumptech.glide.load.data.DataFetcher.DataCallback<? super java.io.InputStream> callback)
        Specified by:
        loadData in interface com.bumptech.glide.load.data.DataFetcher<java.io.InputStream>
      • onFailure

        public void onFailure​(@NonNull
                              okhttp3.Call call,
                              @NonNull
                              java.io.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<java.io.InputStream>
      • cancel

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

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

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