public abstract class AtsUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
checkMd5sum(File file,
String checkCode)
检查指定文件的md5sum和指定的检验码是否一致。
|
static File |
download(String url,
File toDir)
通过HTTP GET方式下载文件到指定的目录。
|
static boolean |
pathSecurityCheck(String path)
Path security check boolean.
|
static File |
ungzip(File gzip,
File toDir)
解压gzip文件到指定的目录,目前只能解压gzip包里面只包含一个文件的压缩包。
|
static List<File> |
unzip(File zip,
File toDir)
解压zip文件到指定的目录。
|
public static File ungzip(File gzip, File toDir) throws IOException
gzip
- 需要解压的gzip文件toDir
- 需要解压到的目录IOException
- the io exceptionpublic static List<File> unzip(File zip, File toDir) throws IOException
zip
- 需要解压的zip文件toDir
- 需要解压到的目录IOException
- the io exceptionpublic static File download(String url, File toDir) throws AlipayApiException
url
- 需要下载的URLtoDir
- 需要下载到的目录AlipayApiException
- the alipay api exceptionpublic static boolean checkMd5sum(File file, String checkCode) throws IOException
file
- 需要检验的文件checkCode
- 已知的md5sum检验码IOException
- the io exceptionpublic static boolean pathSecurityCheck(String path)
path
- the pathCopyright © 2018. All rights reserved.