code: public static long copy(URL url, File file) throws FileNotFoundException, IOException
    {
      return copy(url, new FileOutputStream(file));
    }
docs: Copy bytes from remote file denoted by given URL to specified local file. This method creates local file if not
  already exists.
  
  @param url source remote file URL,
  @param file target local file.
  @return the number of bytes transfered.
  @throws FileNotFoundException if given <code>file</code> does not exist and cannot be created.
  @throws IOException if bytes transfer fails.