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: Checksum ของไฟล์ในไฟล์ ZIP

คิกรีเทิร์น
boolean จริงหากมีไฟล์แคชอยู่ เป็นเท็จหากไม่มี

getDefaultCache

public static PartialZipDownloadCache getDefaultCache ()

คิกรีเทิร์น
PartialZipDownloadCache

populateCacheFile

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

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

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

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

crc String: Checksum CRC ของไฟล์ใน ZIP

วิธีการที่มีการป้องกัน

cleanUpCache

protected void cleanUpCache ()