@Override
    public Resource<T> decode(File source, int width, int height) throws IOException {
        InputStream is = null;
        Resource<T> result = null;
        try {
            is = fileOpener.open(source);
            result = streamDecoder.decode(is, width, height);
        } finally {
            if (is != null) {
                try {
                    is.close();
                } catch (IOException e) {
                    // Do nothing.
                }
            }
        }
        return result;
    }
A decoder that wraps an {@link InputStream} decoder to allow it to decode from a file.

@param <T> The type of resource that the wrapped InputStream decoder decodes.
core/src/main/java/com/bumptech/glide/load/resource/file/FileToStreamDecoder.java