使用 Java 压缩和解压缩文件夹和文件
如果我的应用程序想要使用 java 以动态方式压缩结果文件(文件组),Java 中有哪些可用选项? 当我浏览时,我有 java.util.zip 包可供使用,但是还有其他方法可以使用它来实现吗?
If My Application wants to zip the Resultant files(group of Files) using java in a dynamic way, what are the available options in Java?
When i Browsed I have got java.util.zip package to use, but is there any other way where I can use it to implement?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
已知原始 Java 实现存在一些与文件编码相关的错误。例如,它无法正确处理带有变音符号的文件名。
TrueZIP 是我们在项目中使用的替代方案: https://truezip.dev.java.net/
检查网站上的文档。
The original Java implementation is known to have some bugs related to files encoding. For example it can't properly handle filenames with umlauts.
TrueZIP is an alternative that we've used in our project: https://truezip.dev.java.net/
Check the documentation on the site.
可以使用JDK自带的ZIP文件处理库
另外此教程可能会有所帮助。
You can use ZIP file handling library that comes with JDK
Also this tutorials might be helpful.
Java 有一个 java.util.zip.ZipInputStream 并且您可以使用 ZipEntry ...类似的东西
Java have a java.util.zip.ZipInputStream and along with this you can use ZipEntry ... Something like