Package cool.scx.common.zip
Class ZipBuilder
java.lang.Object
cool.scx.common.zip.ZipBuilder
简化 zip 的创建
- Version:
- 0.1.4
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionZipBuilder(Path path) ZipBuilder(Path path, ZipOptions zipOptions) ZipBuilder(ZipFile zipFile) -
Method Summary
Modifier and TypeMethodDescriptionitems()put(String zipPath, InputStream inputStream) put(String zipPath, Path path, ZipOptions zipOptions) put(Path path, ZipOptions zipOptions) byte[]toBytes()将 virtualFile 转换为 byte 数组 方便前台用户下载使用byte[]toBytes(ZipOptions zipOptions) toFile(Path outputPath, ZipOptions zipOptions) 将一个虚拟文件压缩void
-
Constructor Details
-
ZipBuilder
public ZipBuilder() -
ZipBuilder
-
ZipBuilder
-
ZipBuilder
-
-
Method Details
-
put
-
put
-
put
-
put
-
put
-
put
-
put
-
remove
-
get
-
items
-
writeToZipOutputStream
- Throws:
IOException
-
toBytes
- Throws:
Exception
-
toBytes
将 virtualFile 转换为 byte 数组 方便前台用户下载使用- Returns:
- a
- Throws:
Exception- a
-
toFile
将一个虚拟文件压缩- Parameters:
outputPath- a- Returns:
- a
- Throws:
IOException- if any.
-
toFile
- Throws:
IOException
-