public class CompressionCore extends Object
| 构造器和说明 |
|---|
CompressionCore() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
compression(String sourceDir,
String zipFileDir,
String fileName,
String comment,
LevelEnum level,
VolumeSizeEnum volumeSize,
Boolean isDelete,
Charset encoding)
普通压缩
|
static void |
compression(String sourceDir,
String zipFileDir,
String fileName,
String comment,
LevelEnum level,
VolumeSizeEnum volumeSize,
Boolean isDelete,
Charset encoding,
String password)
密码压缩
|
public static void compression(String sourceDir, String zipFileDir, String fileName, String comment, LevelEnum level, VolumeSizeEnum volumeSize, Boolean isDelete, Charset encoding, String password) throws MsToolsException
sourceDir - 待压缩目录或文件zipFileDir - 压缩文件保存目录 null 使用压缩目录父目录fileName - 压缩文件名(不含文件扩展名) null 使用压缩目录名comment - 压缩文件注释 允许 nulllevel - 压缩级别 null 时使用默认级别volumeSize - 卷大小 Must be between 64kB and about 4GB (depending on the JVM). null 时使用默认卷大小isDelete - 是否删除源文件 null 时使用 falseencoding - 编码 null 时使用 UTF-8password - 密码 null 时使用不加密MsToolsException - 如果压缩失败,抛出该异常public static void compression(String sourceDir, String zipFileDir, String fileName, String comment, LevelEnum level, VolumeSizeEnum volumeSize, Boolean isDelete, Charset encoding) throws MsToolsException
sourceDir - 待压缩目录或文件zipFileDir - 压缩文件保存目录 null 使用压缩目录父目录fileName - 压缩文件名(不含文件扩展名) null 使用压缩目录名comment - 压缩文件注释 允许 nulllevel - 压缩级别 null 时使用默认级别volumeSize - 卷大小 Must be between 64kB and about 4GB (depending on the JVM). null 时使用默认卷大小isDelete - 是否删除源文件 null 时使用 falseencoding - 编码 null 时使用 UTF-8MsToolsException - 如果压缩失败,抛出该异常Copyright © 2024. All rights reserved.