部分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 static PartialZipDownloadCache getDefaultCache ()

退货
PartialZipDownloadCache

填充缓存文件

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

填充缓存中的文件

参数
toCache File :要放入缓存的文件

fileName String : 文件的路径

crc String : zip 中文件的 crc 校验和

受保护的方法

清理缓存

protected void cleanUpCache ()