PartialZipDownloadCache

public class PartialZipDownloadCache
extends Object

java.lang.Object
com.android.tradefed.build.cache.PartialZipDownloadCache


Utilitas untuk meng-cache file download sebagian berdasarkan kontennya. Utilitas ini didasarkan pada konten zip sehingga mencakup crc secara gratis dari metadata.

Ringkasan

Konstruktor yang dilindungi

PartialZipDownloadCache()

Metode publik

boolean getCachedFile(File targetFile, String fileName, String crc)

Menemukan file dalam cache yang cocok dengan jalur dan crc

static PartialZipDownloadCache getDefaultCache()
void populateCacheFile(File toCache, String fileName, String crc)

Mengisi file dalam cache

Metode yang dilindungi

void cleanUpCache()

Konstruktor yang dilindungi

PartialZipDownloadCache

protected PartialZipDownloadCache ()

Metode publik

getCachedFile

public boolean getCachedFile (File targetFile, 
                String fileName, 
                String crc)

Menemukan file dalam cache yang cocok dengan jalur dan crc

Parameter
targetFile File: lokasi tempat file akan ditampilkan

fileName String: Jalur file

crc String: checksum file dalam zip

Hasil
boolean Benar jika file cache ada, salah jika tidak

getDefaultCache

public static PartialZipDownloadCache getDefaultCache ()

Hasil
PartialZipDownloadCache

populateCacheFile

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

Mengisi file dalam cache

Parameter
toCache File: File yang akan dimasukkan ke cache

fileName String: jalur file

crc String: checksum crc file dalam zip

Metode yang dilindungi

cleanUpCache

protected void cleanUpCache ()