Class OkHttpUrlLoader

  • All Implemented Interfaces:
    com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,​java.io.InputStream>

    public class OkHttpUrlLoader
    extends java.lang.Object
    implements com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,​java.io.InputStream>
    A simple model loader for fetching media over http/https using OkHttp.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OkHttpUrlLoader.Factory
      The default factory for OkHttpUrlLoaders.
      • Nested classes/interfaces inherited from interface com.bumptech.glide.load.model.ModelLoader

        com.bumptech.glide.load.model.ModelLoader.LoadData<Data extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      OkHttpUrlLoader​(okhttp3.Call.Factory client)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.bumptech.glide.load.model.ModelLoader.LoadData<java.io.InputStream> buildLoadData​(com.bumptech.glide.load.model.GlideUrl model, int width, int height, com.bumptech.glide.load.Options options)  
      boolean handles​(com.bumptech.glide.load.model.GlideUrl url)  
      • Methods inherited from class java.lang.Object

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

      • OkHttpUrlLoader

        public OkHttpUrlLoader​(@NonNull
                               okhttp3.Call.Factory client)
    • Method Detail

      • handles

        public boolean handles​(@NonNull
                               com.bumptech.glide.load.model.GlideUrl url)
        Specified by:
        handles in interface com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,​java.io.InputStream>
      • buildLoadData

        public com.bumptech.glide.load.model.ModelLoader.LoadData<java.io.InputStream> buildLoadData​(@NonNull
                                                                                                     com.bumptech.glide.load.model.GlideUrl model,
                                                                                                     int width,
                                                                                                     int height,
                                                                                                     @NonNull
                                                                                                     com.bumptech.glide.load.Options options)
        Specified by:
        buildLoadData in interface com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,​java.io.InputStream>