code: public static boolean curlPackage(
        String uri, String destination, boolean isVerbose, boolean isInheritIO) {
  
      // get the directory containing the target file
      File parentDirectory = Paths.get(destination).getParent().toFile();
  
      // using curl copy the url to the target file
      String cmd = String.format("curl %s -o %s", uri, destination);
      int ret = runSyncProcess(isVerbose, isInheritIO,
          splitTokens(cmd), new StringBuilder(), parentDirectory);
  
      return ret == 0;
    }
docs: Copy a URL package to a target folder
  
  @param uri the URI to download core release package
  @param destination the target filename to download the release package to
  @param isVerbose display verbose output or not
  @return true if successful