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 เป็นจริงหากมีไฟล์แคช เป็นเท็จหากไม่มี

getDefaultCache

public static PartialZipDownloadCache getDefaultCache ()

การคืนสินค้า
PartialZipDownloadCache

populateCacheFile

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

ป้อนข้อมูลไฟล์ในแคช

พารามิเตอร์
toCache File: ไฟล์ที่จะใส่ในแคช

fileName String: เส้นทางของไฟล์

crc String: ผลรวมตรวจสอบ CRC ของไฟล์ใน ZIP

วิธีการที่ได้รับการป้องกัน

cleanUpCache

protected void cleanUpCache ()