private static void writeToLocal(String destination, InputStream input) throws Exception{ int index; byte[] bytes = new byte[1024]; FileOutputStream downloadFile = new FileOutputStream(destination); while ((index = input.read(bytes)) != -1) { downloadFile.write(bytes, 0, index); downloadFile.flush(); } downloadFile.close(); input.close(); }
java 流写入本地文件
猜你喜欢
转载自wuzijingaip.iteye.com/blog/2414649
今日推荐
周排行