使用java动态解压缩 [英] Unzip dynamically using java

查看:87
本文介绍了使用java动态解压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件夹路径名。我需要编写一个代码,它带有任何带有.zip后缀的文件并解压缩。源路径需要是动态的。目的地可能是硬编码的。无法使用属性,因为每天有50个zip文件到达该文件夹。请帮助....

I have a folder path name. I need to write a code which takes any file with ".zip" suffix and unzips it. Source path needs to be dynamic. Destination may be hardcoded. Cannot do it using properties as daily 50 zip files comes to that folder. Please help....

推荐答案

获取给定文件夹中的文件并使用扩展名过滤(zip)

check 在与Java中的模式匹配的目录中列出文件 [ ^ ]

现在用ZipInputStream读取ZIP文件并输出到FileOutputStream

check 如何从ZIP文件中解压缩文件 [ ^ ]
Get Files in given folder and filter with extension (zip)
check Listing files in a directory matching a pattern in Java[^]
Now read ZIP file with "ZipInputStream" and output it to "FileOutputStream"
check How To Decompress Files From A ZIP File[^]


这篇关于使用java动态解压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆