Package | Description |
---|---|
cn.hutool.core.compress |
压缩解压封装
|
Modifier and Type | Method and Description |
---|---|
ZipWriter |
ZipWriter.add(boolean withSrcDir,
FileFilter filter,
File... files)
对文件或文件目录进行压缩
|
ZipWriter |
ZipWriter.add(Resource... resources)
添加资源到压缩包,添加后关闭资源流
|
ZipWriter |
ZipWriter.add(String[] paths,
InputStream[] ins)
对流中的数据加入到压缩文件
路径列表和流列表长度必须一致 |
ZipWriter |
ZipWriter.add(String path,
InputStream in)
添加文件流到压缩包,添加后关闭输入文件流
如果输入流为 null ,则只创建空目录 |
static ZipWriter |
ZipWriter.of(File zipFile,
Charset charset)
创建ZipWriter
|
static ZipWriter |
ZipWriter.of(OutputStream out,
Charset charset)
创建ZipWriter
|
ZipWriter |
ZipWriter.setComment(String comment)
设置注释
|
ZipWriter |
ZipWriter.setLevel(int level)
设置压缩级别,可选1~9,-1表示默认
|
Copyright © 2024. All rights reserved.