英特內軟體股份有限公司


jcx.util
Class fzip

java.lang.Object
  |
  +--jcx.util.fzip

public class fzip
extends java.lang.Object

檔案壓縮解壓縮.


Constructor Summary
fzip()
           
 
Method Summary
static java.lang.String filesUnzip(java.lang.String source_path, java.lang.String target_path)
          將壓縮檔案解壓縮.
static java.lang.String filesZip(java.lang.String[] source_path, java.lang.String target_path)
          將檔案壓縮成壓縮檔.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

fzip

public fzip()
Method Detail

filesZip

public static java.lang.String filesZip(java.lang.String[] source_path,
                                        java.lang.String target_path)
將檔案壓縮成壓縮檔.

傳入路徑必須以"/"為分隔符號.

e.g.

String source_path[]={"/temp/doc.txt","/temp/test","/source/doc"}; String target_path="/temp/testFzip.zip"; filesZip(source_path,target_path);
Parameters:
source_path - 欲壓縮之多個檔案或子目錄(包含路徑).
target_path - 欲將壓縮當存為何檔名(包含路徑).
Returns:
String 錯誤訊息,無錯誤傳回空字串.

filesUnzip

public static java.lang.String filesUnzip(java.lang.String source_path,
                                          java.lang.String target_path)
將壓縮檔案解壓縮.

傳入路徑必須以"/"為分隔符號.

e.g.

filesUnzip("/temp/testFzip.zip","/source/temp");
Parameters:
source_path - 壓縮檔之檔名(包含路徑).
target_path - 欲將壓縮檔解壓縮之路徑.
Returns:
String 錯誤訊息,無錯誤傳回空字串.

英特內軟體股份有限公司