public class ZipAndUnZip
extends java.lang.Object
构造器和说明 |
---|
ZipAndUnZip() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
getExtension(java.lang.String f)
Used to extract and return the extension of a given file.
|
static java.lang.String |
getFileName(java.lang.String f)
Used to extract the filename without its extension.
|
static void |
gzips(java.lang.String zipfileName,
java.lang.String mDestFile)
Gzip file.
|
static int |
unZip(java.io.InputStream unzipfileStream,
java.lang.String mDestPath)
Unzip file using InputStream unzipfileStream
|
static int |
unZip(java.lang.String unZipfileName,
java.lang.String mDestPath)
Unzip file
|
static void |
unzipGzips(java.lang.String inFileName)
Unzip a gzip file with default output file path.
|
static void |
unzipGzips(java.lang.String inFileName,
java.lang.String outFileName)
Unzip a gzip file.
|
static void |
zipFile(java.lang.String fileFrom,
java.lang.String fileTo)
Zip a file.
|
public static int unZip(java.lang.String unZipfileName, java.lang.String mDestPath)
unZipfileName
- mDestPath
- public static int unZip(java.io.InputStream unzipfileStream, java.lang.String mDestPath)
unzipfileStream
- mDestPath
- public static java.lang.String getExtension(java.lang.String f)
f
- Incoming file to get the extension ofString
representing the extension of the incoming
file.public static java.lang.String getFileName(java.lang.String f)
f
- Incoming file to get the filenameString
representing the filename without its
extension.public static void gzips(java.lang.String zipfileName, java.lang.String mDestFile) throws java.lang.Exception
zipfileName
- mDestFile
- java.lang.Exception
public static void unzipGzips(java.lang.String inFileName) throws java.lang.Exception
inFileName
- java.lang.Exception
public static void unzipGzips(java.lang.String inFileName, java.lang.String outFileName) throws java.lang.Exception
inFileName
- outFileName
- java.lang.Exception
public static void zipFile(java.lang.String fileFrom, java.lang.String fileTo)
fileFrom
- fileTo
-