1 package com.bumptech.glide.load.resource.file; 2 3 import com.bumptech.glide.load.ResourceDecoder; 4 import com.bumptech.glide.load.engine.Resource; 5 6 import java.io.File; 7 8 /** 9 * A simple {@link com.bumptech.glide.load.ResourceDecoder} that creates resource for a given {@link java.io.File}. 10 */ 11 public class FileDecoder implements ResourceDecoder<File, File> { 12 13 @Override 14 public Resource<File> decode(File source, int width, int height) { 15 return new FileResource(source); 16 } 17 18 @Override 19 public String getId() { 20 return ""; 21 } 22 } 23