Home | History | Annotate | Download | only in provider
      1 package com.bumptech.glide.provider;
      2 
      3 import com.bumptech.glide.load.Encoder;
      4 import com.bumptech.glide.load.ResourceDecoder;
      5 import com.bumptech.glide.load.ResourceEncoder;
      6 
      7 import java.io.File;
      8 
      9 /**
     10  * A load provider that provides the necessary encoders and decoders to decode a specific type of resource from a
     11  * specific type of data.
     12  *
     13  * @param <T> The type of data the resource will be decoded from.
     14  * @param <Z> The type of resource that will be decoded.
     15  */
     16 public interface DataLoadProvider<T, Z> {
     17 
     18     /**
     19      * Returns the {@link com.bumptech.glide.load.ResourceDecoder} to use to decode the resource from the disk cache.
     20      */
     21     ResourceDecoder<File, Z> getCacheDecoder();
     22 
     23     /**
     24      * Returns the {@link com.bumptech.glide.load.ResourceDecoder} to use to decode the resource from the original data.
     25      */
     26     ResourceDecoder<T, Z> getSourceDecoder();
     27 
     28     /**
     29      * Returns the {@link com.bumptech.glide.load.Encoder} to use to write the original data to the disk cache.
     30      */
     31     Encoder<T> getSourceEncoder();
     32 
     33     /**
     34      * Returns the {@link com.bumptech.glide.load.ResourceEncoder} to use to write the decoded and transformed resource
     35      * to the disk cache.
     36      */
     37     ResourceEncoder<Z> getEncoder();
     38 }
     39