遠端壓縮

public class RemoteZip
extends Object

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


用於解壓縮遠端 zip 檔案中的單一檔案的實用程式。

概括

公共構造函數

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

建構函數

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

建構函數

公共方法

void downloadFiles (File destDir, originalFiles) downloadFiles (File destDir, originalFiles)

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

long getLastAccess ()

取得該物件最後一次被造訪的時間。

String getRemoteFilePath ()

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

getZipEntries ()

取得遠端 zip 檔案的 zip 檔案條目。

void setLastAccess (long timestamp)

更新物件的上次訪問時間戳記。

公共構造函數

遠端壓縮

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

建構函數

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

fileSize long :遠端檔案的大小。

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

useZip64 boolean : 是否使用 zip64 格式進行部分下載。

useCache boolean

遠端壓縮

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

參數
remoteFilePath String

fileSize long

downloader IFileDownloader

useZip64 boolean

遠端壓縮

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

建構函數

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

fileSize long :遠端檔案的大小。

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

公共方法

下載文件

public void downloadFiles (File destDir, 
                 originalFiles)

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

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

originalFiles :要從遠端 zip 檔案下載的條目清單。

投擲
com.android.tradefed.build.BuildRetrievalError
IO異常
BuildRetrievalError

取得最後存取權限

public long getLastAccess ()

取得該物件最後一次被造訪的時間。

退貨
long

取得遠端檔案路徑

public String getRemoteFilePath ()

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

退貨
String

取得ZipEntries

public  getZipEntries ()

取得遠端 zip 檔案的 zip 檔案條目。

退貨

投擲
BuildRetrievalError如果無法下載檔案。

設定最後訪問時間

public void setLastAccess (long timestamp)

更新物件的上次訪問時間戳記。

參數
timestamp long