將ByteArrayOutputStream類型變量中的數據存儲到文件中


 

代碼:

File zipFile=new File("c:\\1.zip");
ByteArrayOutputStream byteOSZip = new ByteArrayOutputStream(4096); service.copyIHEReportZipOutputStream(id, byteOSZip);// 這里是對byteOSZip的處理,和業務有關,你應該把這里修改成自己的代碼 FileOutputStream fos2 = new FileOutputStream(zipFile); byteOSZip.writeTo(fos2); fos2.close();

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM