code: public static File cacheFile(@javax.annotation.Nonnull final String url, @javax.annotation.Nonnull final String file) throws IOException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
      if (!new File(file).exists()) {
        IOUtils.copy(get(url), new FileOutputStream(file));
      }
      return new File(file);
    }
docs: Cache file file.
  
  @param url  the url
  @param file the file
  @return the file
  @throws IOException              the io exception
  @throws NoSuchAlgorithmException the no such algorithm exception
  @throws KeyStoreException        the key store exception
  @throws KeyManagementException   the key management exception