zl程序教程

您现在的位置是:首页 >  后端

当前栏目

Java通过zip压缩文件详解编程语言

JAVAzip编程语言 详解 通过 压缩文件
2023-06-13 09:20:30 时间
// begin writing a new ZIP entry, positions the stream to the start of the entry data zos.putNextEntry(new ZipEntry(srcFile.getName())); int length; while ((length = fis.read(buffer)) 0) { zos.write(buffer, 0, length); zos.closeEntry(); // close the InputStream fis.close(); // close the ZipOutputStream zos.close(); catch (IOException ioe) { System.out.println("Error creating zip file" + ioe);

10927.html

cjava