@Nullable
  @WorkerThread
  Pair<FileExtension, InputStream> fetch(String url) {
    File cachedFile;
    try {
      cachedFile = getCachedFile(url);
    } catch (FileNotFoundException e) {
      return null;
    }
    if (cachedFile == null) {
      return null;
    }

    FileInputStream inputStream;
    try {
      inputStream = new FileInputStream(cachedFile);
    } catch (FileNotFoundException e) {
      return null;
    }

    FileExtension extension;
    if (cachedFile.getAbsolutePath().endsWith(".zip")) {
      extension = FileExtension.ZIP;
    } else if (cachedFile.getAbsolutePath().endsWith(".gz")) {
      extension = FileExtension.GZIP;
    } else {
      extension = FileExtension.JSON;
    }

    Logger.debug("Cache hit for " + url + " at " + cachedFile.getAbsolutePath());
    return new Pair<>(extension, (InputStream) inputStream);
  }
If the animation doesn't exist in the cache, null will be returned.
<p>
Once the animation is successfully parsed, {@link #renameTempFile(String, FileExtension)} must be
called to move the file from a temporary location to its permanent cache location so it can
be used in the future.
lottie/src/main/java/com/airbnb/lottie/network/NetworkCache.java