@Override
        public boolean write(File file) {
            boolean success = false;
            OutputStream os = null;
            try {
                os = fileOpener.open(file);
                success = encoder.encode(data, os);
            } catch (FileNotFoundException e) {
                if (Log.isLoggable(TAG, Log.DEBUG)) {
                    Log.d(TAG, "Failed to find file to write to disk cache", e);
                }
            } finally {
                if (os != null) {
                    try {
                        os.close();
                    } catch (IOException e) {
                        // Do nothing.
                    }
                }
            }
            return success;
        }
Returns a transformed and transcoded resource decoded from source data, or null if no source data could be
obtained or no resource could be decoded.

<p>
    Depending on the {@link DiskCacheStrategy} used, source data is either decoded
    directly or first written to the disk cache and then decoded from the disk cache.
</p>

@throws Exception
core/src/main/java/com/bumptech/glide/load/engine/DecodeJob.java