Package tech.riemann.etp
Class ZipUtils
java.lang.Object
tech.riemann.etp.ZipUtils
- Author:
- Kerbores(kerbores@riemann.tech)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void解压static voidunzipWithStream(InputStream inputStream, String descDir) 使用流解压ZIP文件 该方法通过输入流读取ZIP文件,并将其内容解压到指定的目录中static void压缩文件目录
-
Constructor Details
-
ZipUtils
public ZipUtils()
-
-
Method Details
-
zipFiles
压缩文件目录- Parameters:
source- 源文件目录(单个文件和多层目录)destit- 目标文件
-
unzipFile
解压- Parameters:
zipPath- zip 文件descDir- 解压目标- Throws:
IOException
-
unzipWithStream
使用流解压ZIP文件 该方法通过输入流读取ZIP文件,并将其内容解压到指定的目录中- Parameters:
inputStream- 输入流,用于读取ZIP文件的内容descDir- 解压目标目录,ZIP文件的内容将解压到这个目录下
-