public class TarUtils extends Object
| 构造器和说明 |
|---|
TarUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
pack(File srcFile)
压缩
srcFile = /home/answer/logs
压缩文件 = /home/answer/logs.tar
srcFileFILE_SUFFIX
|
static void |
pack(File srcFile,
File destFile)
压缩
|
static void |
pack(File srcFile,
String destPath) |
static void |
pack(String srcPath)
压缩
srcPath = /home/answer/logs
压缩文件 = /home/answer/logs.tar
srcPathFILE_SUFFIX
|
static void |
pack(String srcPath,
String destPath)
压缩
|
static void |
unPack(File srcFile)
解压
srcFile = /home/answer/logs.tar
解压目录 = /home/answer
srcFile
|
static void |
unPack(File srcFile,
File destFile)
解压
|
static void |
unPack(File srcFile,
String destPath)
解压
|
static void |
unPack(String srcPath)
解压
srcPath = /home/answer/logs.tar
解压目录 = /home/answer
srcPath
|
static void |
unPack(String srcPath,
String destPath) |
public static void pack(String srcPath) throws Exception
srcPath = /home/answer/logs 压缩文件 = /home/answer/logs.tarsrcPathFILE_SUFFIX
srcPath - 待压缩文件路径Exception - expublic static void pack(File srcFile) throws Exception
srcFile = /home/answer/logs 压缩文件 = /home/answer/logs.tarsrcFileFILE_SUFFIX
srcFile - 待压缩文件路径Exception - expublic static void pack(String srcPath, String destPath) throws Exception
srcPath - 待压缩文件路径destPath - 生成的压缩包的路径Exception - expublic static void pack(File srcFile, File destFile) throws Exception
srcFile - 待压缩文件路径destFile - 生成的压缩包的路径Exception - expublic static void pack(File srcFile, String destPath) throws Exception
srcFile - 待压缩文件路径destPath - 生成的压缩包的路径Exception - expublic static void unPack(String srcPath) throws Exception
srcPath = /home/answer/logs.tar
解压目录 = /home/answer
srcPath
srcPath - 待解压压缩包路径Exception - expublic static void unPack(File srcFile) throws Exception
srcFile = /home/answer/logs.tar
解压目录 = /home/answer
srcFile
srcFile - 待解压压缩包路径Exception - expublic static void unPack(File srcFile, File destFile) throws Exception
srcFile - 待解压压缩包路径destFile - 解压路径Exception - expublic static void unPack(String srcPath, String destPath) throws Exception
srcPath - 待解压压缩包路径destPath - 解压的目录Exception - exCopyright © 2020. All rights reserved.