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.getCachedFile
public boolean getCachedFile (File targetFile, String fileName, String crc)
ค้นหาไฟล์ในแคชที่ตรงกับเส้นทางและ CRC
พารามิเตอร์ | |
---|---|
targetFile | File : ตำแหน่งที่จะส่งคืนไฟล์ |
fileName | String : เส้นทางของไฟล์ |
crc | String : การตรวจสอบไฟล์ในรูปแบบ zip |
การส่งคืน | |
---|---|
boolean | เป็นจริงหากมีไฟล์แคช มิฉะนั้นจะเป็นเท็จ |
รับDefaultCache
public static PartialZipDownloadCache getDefaultCache ()
การส่งคืน | |
---|---|
PartialZipDownloadCache |
เติม CacheFile
public void populateCacheFile (File toCache, String fileName, String crc)
เติมไฟล์ในแคช
พารามิเตอร์ | |
---|---|
toCache | File : ไฟล์ที่จะใส่ในแคช |
fileName | String : เส้นทางของไฟล์ |
crc | String : การตรวจสอบ crc ของไฟล์ในรูปแบบ zip |
วิธีการที่ได้รับการป้องกัน
cleanUpCache
protected void cleanUpCache ()