代碼:
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();