非常感谢!
URL Url = new URL(url); URLConnection conn = Url.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); FileOutputStream FOS = new FileOutputStream(path + this.FileName); // 创建写入文件内存流,通过此流向目标写文件 byte buf[] = new byte[1024]; int numread; while ((numread = is.read(buf)) != -1) { FOS.write(buf, 0, numread); } try { is.close(); } catch (Exception ex) { ; }
81,092
社区成员
341,716
社区内容
加载中
试试用AI创作助手写篇文章吧