PartialZipDownloadCache

public class PartialZipDownloadCache
extends Object

java.lang.Object
   ↳ com.android.tradefed.build.cache.PartialZipDownloadCache


根據檔案內容快取部分下載檔案的工具。這是以 ZIP 內容為基礎,因此會從中繼資料中免費納入 CRC。

摘要

受保護的建構函式

PartialZipDownloadCache()

公用方法

boolean getCachedFile(File targetFile, String fileName, String crc)

在快取中尋找與路徑和 CRC 相符的檔案

static PartialZipDownloadCache getDefaultCache()
void populateCacheFile(File toCache, String fileName, String crc)

在快取中填入檔案

受保護的方法

void cleanUpCache()

受保護的建構函式

PartialZipDownloadCache

protected PartialZipDownloadCache ()

公用方法

getCachedFile

public boolean getCachedFile (File targetFile, 
                String fileName, 
                String crc)

在快取中尋找與路徑和 CRC 相符的檔案

參數
targetFile File:檔案的傳回位置

fileName String:檔案路徑

crc String:ZIP 檔案中的檔案總和檢查碼

傳回
boolean 如果快取檔案存在,則傳回 true,否則傳回 false

getDefaultCache

public static PartialZipDownloadCache getDefaultCache ()

傳回
PartialZipDownloadCache

populateCacheFile

public void populateCacheFile (File toCache, 
                String fileName, 
                String crc)

在快取中填入檔案

參數
toCache File:要放入快取的檔案

fileName String:檔案路徑

crc String:ZIP 檔案中的檔案 CRC 總和檢查碼

受保護的方法

cleanUpCache

protected void cleanUpCache ()