コード例 #1
0
  public static void downloadModPackResources(String name, String label, File path) {
    Map<String, String> downloadFileList = getModPackResources(name, path);

    if (downloadFileList.size() > 0
        && DownloadUtils.downloadFiles(downloadFileList, 30, TimeUnit.SECONDS)
            != downloadFileList.size()) {
      Util.log("Could not download all resources for modpack '%s'.", label);
    }
  }
コード例 #2
0
 public static void downloadAllFiles(Map<String, String> fileMap) {
   int size = fileMap.size();
   if (size > 0 && DownloadUtils.downloadFiles(fileMap, 30, TimeUnit.SECONDS) != size) {
     Util.log("Could not download all files");
   }
 }