byte[] outByte = out.toByteArray();
ByteArrayOutputStream zipOut =new ByteArrayOutputStream();
ZipOutputStream zipOutputStream =new ZipOutputStream(zipOut);
ZipEntry entry =new ZipEntry("zip");
entry.setSize(outByte.length);
zipOutputStream.putNextEntry(entry);
zipOutputStream.write(outByte);
zipOutputStream.closeEntry();
zipOutputStream.close();
网友评论