docs: private File makeDestFile(URL src) {
          if (dest == null) {
              throw new IllegalArgumentException("Please provide a download destination");
          }
  
          File destFile = dest;
          if (destFile.isDirectory()) {
              //guess name from URL
              String name = src.toString();
              if (name.endsWith("/")) {
                  name = name.substring(0, name.length() - 1);
              }
              name = name.substring(name.lastIndexOf('/') + 1);
              destFile = new File(dest, name);
          } else {
              //create destination directory
              File parent = destFile.getParentFile();
              if (parent != null) {
                  parent.mkdirs();
              }
          }
          return destFile;
      }