标签:style blog color io os java 文件 div sp
public static void createFileToNewPath(InputStream inStream, String newPath) { try { int bytesum = 0; int byteread = 0; FileOutputStream fs = new FileOutputStream(newPath); byte[] buffer = new byte[1444]; while ((byteread = inStream.read(buffer)) != -1) { bytesum += byteread; // 字节数 文件大小 fs.write(buffer, 0, byteread); } inStream.close(); } catch (Exception e) { e.printStackTrace(); } }
标签:style blog color io os java 文件 div sp
原文地址:http://www.cnblogs.com/sisi-five/p/3991130.html