部分Zip下載快取
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 () |
受保護的構造函數
部分Zip下載快取
protected PartialZipDownloadCache ()
公共方法
取得快取文件
public boolean getCachedFile (File targetFile, String fileName, String crc)
在快取中尋找與路徑和 crc 相符的文件
參數 | |
---|---|
targetFile | File :返回文件的位置 |
fileName | String :檔案路徑 |
crc | String : zip 中檔案的校驗和 |
退貨 | |
---|---|
boolean | 如果快取檔案存在則為 true,否則為 false |
填充快取文件
public void populateCacheFile (File toCache, String fileName, String crc)
填充快取中的文件
參數 | |
---|---|
toCache | File :要放入快取的文件 |
fileName | String : 檔案的路徑 |
crc | String : zip 中檔案的 crc 校驗和 |
受保護的方法
清理快取
protected void cleanUpCache ()