public class RarUtilPwd extends Object
| 构造器和说明 |
|---|
RarUtilPwd() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isRarNameToDir() |
static void |
setRarNameToDir(boolean isRarNameToDir) |
static void |
unrar(File srcRarFile,
String password)
解压指定RAR文件到当前文件夹
|
static void |
unrar(File srcRarFile,
String destPath,
String password)
解压指定RAR文件到指定的路径
|
static void |
unrar(String srcRar,
String password)
解压指定RAR文件到当前文件夹
|
static void |
unrar(String srcRar,
String destPath,
String password)
解压指定的RAR压缩文件到指定的目录中
|
static void |
unRarDir(String rarDir,
String dest,
String pwd)
使用给定密码解压指定目录下的rar压缩文件到指定目录
如果指定目录不存在,可以自动创建,不合法的路径将导致异常被抛出
|
public static final String SEPARATOR
public static void unRarDir(String rarDir, String dest, String pwd) throws Exception
如果指定目录不存在,可以自动创建,不合法的路径将导致异常被抛出
rarDir - 指定的rar压缩文件dest - 解压目录pwd - 密码net.lingala.zip4j.exception.ZipException - 压缩文件有损坏或者解压缩失败抛出Exceptionpublic static void unrar(String srcRar, String password) throws IOException
srcRar - 指定解压password - 压缩文件时设定的密码IOExceptionpublic static void unrar(String srcRar, String destPath, String password) throws IOException
srcRar - 指定的RAR压缩文件destPath - 指定解压到的目录password - 压缩文件时设定的密码IOExceptionpublic static void unrar(File srcRarFile, String password) throws IOException
srcRarFile - 解压文件password - 压缩文件时设定的密码IOExceptionpublic static void unrar(File srcRarFile, String destPath, String password) throws IOException
srcRarFile - 需要解压RAR文件destPath - 指定解压路径password - 压缩文件时设定的密码IOExceptionpublic static boolean isRarNameToDir()
public static void setRarNameToDir(boolean isRarNameToDir)
isRarNameToDir - the isRarNameToDir to setCopyright © 2024. All rights reserved.