package com.csu.test; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; public class Util { /** * @author CSU-Max * @param strUrl 图片的路径 * @param path 保存的路径 * @throws IOException */ public void download(String strUrl, String path) throws IOException { URL url = null; InputStream is = null; OutputStream os = null; byte[] buffer = new byte[8192]; int bytesRead = 0; try { url = new URL(strUrl); is = url.openStream(); os = new FileOutputStream(path); while ((bytesRead = is.read(buffer, 0, 8192)) != -1) { os.write(buffer, 0, bytesRead); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ is.close(); os.close(); } } }

zhangguobin LV14
2019年9月10日
1662530129 LV12
2019年8月12日
yihang LV7
2019年2月3日
dagf113225 LV68
2019年1月9日
756398953 LV12
2018年11月15日
冬瓜Summit LV10
2018年6月11日
360763120 LV11
2018年4月27日
lindawhn LV6
2018年4月12日
xl921005 LV1
2017年6月16日
yly123 LV17
2017年3月29日