private boolean writeDataDirect(byte[] data, OutputStream os) {
        boolean success = true;
        try {
            os.write(data);
        } catch (IOException e) {
            if (Log.isLoggable(TAG, Log.DEBUG)) {
                Log.d(TAG, "Failed to write data to output stream in GifResourceEncoder", e);
            }
            success = false;
        }
        return success;
    }
An {@link ResourceEncoder} that can write
{@link GifDrawable} to cache.
core/src/main/java/com/bumptech/glide/load/resource/gif/GifResourceEncoder.java