英特內軟體股份有限公司


jcx.util
Class fzip

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

public class fzip
extends java.lang.Object

  檔案壓縮解壓縮
  程式設計師:samson


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)
   將檔案壓縮成壓縮檔.
Parameters:
String[] - source_path 欲壓縮之多個檔案或子目錄(包含路徑)
String - target_path 欲將壓縮當存為何檔名(包含路徑)
Returns:
String 錯誤訊息,無錯誤傳回空字串
	傳入路徑必須以"/"為分隔符號
ex:
	String source_path[]={"/temp/doc.txt","/temp/test","/source/doc"};
	String target_path="/temp/testFzip.zip";
	filesZip(source_path,target_path);

filesUnzip

public static java.lang.String filesUnzip(java.lang.String source_path,
                                          java.lang.String target_path)
   將壓縮檔案解壓縮.
Parameters:
String - source_path 壓縮檔之檔名(包含路徑)
String - target_path 欲將壓縮檔解壓縮之路徑
Returns:
String 錯誤訊息,無錯誤傳回空字串
	傳入路徑必須以"/"為分隔符號
ex:
	filesUnzip("/temp/testFzip.zip","/source/temp");

英特內軟體股份有限公司