遠端郵遞區號

public class RemoteZip
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.RemoteZip


可將遠端 ZIP 檔案中個別檔案解壓縮的公用程式。

摘要

公用建構函式

RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64)

建構函式

RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader)

建構函式

公用方法

void downloadFiles(File destDir, files)

下載遠端 ZIP 檔案中指定的檔案。

long getLastAccess()

取得上次存取這個物件的時間。

String getRemoteFilePath()

取得遠端 zip 構件的遠端檔案路徑。

getZipEntries()

取得遠端 ZIP 檔案的 ZIP 檔案項目。

void setLastAccess(long timestamp)

更新物件的上次存取時間戳記。

公用建構函式

遠端郵遞區號

public RemoteZip (String remoteFilePath, 
                long fileSize, 
                IFileDownloader downloader, 
                boolean useZip64)

建構函式

參數
remoteFilePath String:待下載檔案的遠端路徑。

fileSize long:遠端檔案大小。

downloader IFileDownloader:用來下載遠端檔案的 @{link IFileDownloader}。

useZip64 boolean:是否使用 zip64 格式下載部分檔案。

遠端郵遞區號

public RemoteZip (String remoteFilePath, 
                long fileSize, 
                IFileDownloader downloader)

建構函式

參數
remoteFilePath String:待下載檔案的遠端路徑。

fileSize long:遠端檔案大小。

downloader IFileDownloader:用來下載遠端檔案的 @{link IFileDownloader}。

公用方法

下載檔案

public void downloadFiles (File destDir, 
                 files)

下載遠端 ZIP 檔案中指定的檔案。

參數
destDir File:要存放下載檔案的目錄。

files :遠端 ZIP 檔案中要下載的項目清單。

擲回
com.android.tradefed.build.BuildRetrievalError
BuildRetrievalError

取得 LastAccess

public long getLastAccess ()

取得上次存取這個物件的時間。

傳回
long

getRemoteFilePath

public String getRemoteFilePath ()

取得遠端 zip 構件的遠端檔案路徑。

傳回
String

getZipEntry

public  getZipEntries ()

取得遠端 ZIP 檔案的 ZIP 檔案項目。

傳回

擲回
BuildRetrievalError

設定最終存取

public void setLastAccess (long timestamp)

更新物件的上次存取時間戳記。

參數
timestamp long