downloadFromUrl 快速下载url文件

public static String downloadFromUrl(String url,String fileName) {  
		  
        try {  
            URL httpurl = new URL(url);  
            File f = new File(fileName);  
            FileUtils.copyURLToFile(httpurl, f);  
        } catch (Exception e) {  
            e.printStackTrace();  
            return "Fault";  
        }   
        return "Successful";  
    }  

你可能感兴趣的:(downloadFromUrl 快速下载url文件)