RemoteZip

public class RemoteZip
extends Object

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


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

摘要

公用建構函式

RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader)

建構函式

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

建構函式

公用方法

void downloadFiles(File destDir, List<CentralDirectoryInfo> originalFiles)

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

long getLastAccess()

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

String getRemoteFilePath()

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

List<CentralDirectoryInfo> getZipEntries()

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

void setLastAccess(long timestamp)

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

公用建構函式

RemoteZip

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

建構函式

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

fileSize long:遠端檔案的大小。

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

RemoteZip

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

參數
remoteFilePath String

fileSize long

downloader IFileDownloader

useZip64 boolean

RemoteZip

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

公用方法

downloadFiles

public void downloadFiles (File destDir, 
                List<CentralDirectoryInfo> originalFiles)

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

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

originalFiles List:要從遠端 ZIP 檔案下載的項目清單。

擲回
com.android.tradefed.build.BuildRetrievalError
java.io.IOException
BuildRetrievalError
IOException

getLastAccess

public long getLastAccess ()

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

傳回
long

getRemoteFilePath

public String getRemoteFilePath ()

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

傳回
String

getZipEntries

public List<CentralDirectoryInfo> getZipEntries ()

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

傳回
List<CentralDirectoryInfo>

擲回
BuildRetrievalError 如果無法下載檔案。
IOException

setLastAccess

public void setLastAccess (long timestamp)

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

參數
timestamp long