RemoteZip

public class RemoteZip
extends Object

java.lang.Object
com.android.tradefed.util.RemoteZip


ยูทิลิตี้สำหรับแตกไฟล์แต่ละไฟล์ภายในไฟล์ ZIP ระยะไกล

สรุป

เครื่องมือสร้างสาธารณะ

RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader)

เครื่องมือสร้าง

RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64)
RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64, boolean useCache)

เครื่องมือสร้าง

เมธอดสาธารณะ

void downloadFiles(File destDir, List<CentralDirectoryInfo> originalFiles)

ดาวน์โหลดไฟล์ที่ระบุในไฟล์ ZIP ระยะไกล

long getLastAccess()

รับเวลาที่เข้าถึงออบเจ็กต์นี้ครั้งล่าสุด

String getRemoteFilePath()

รับเส้นทางไฟล์ระยะไกลของอาร์ติแฟกต์ ZIP ระยะไกล

List<CentralDirectoryInfo> getZipEntries()

รับรายการไฟล์ ZIP ของไฟล์ ZIP ระยะไกล

void setLastAccess(long timestamp)

อัปเดตการประทับเวลาการเข้าถึงครั้งล่าสุดของออบเจ็กต์

เครื่องมือสร้างสาธารณะ

RemoteZip

public RemoteZip (String remoteFilePath, 
                long fileSize, 
                IFileDownloader downloader)

เครื่องมือสร้าง

พารามิเตอร์
remoteFilePath String: เส้นทางระยะไกลไปยังไฟล์ที่จะดาวน์โหลด

fileSize long: ขนาดของไฟล์ระยะไกล

downloader IFileDownloader: @{link IFileDownloader} ที่ใช้ดาวน์โหลดไฟล์ระยะไกล

RemoteZip

public RemoteZip (String remoteFilePath, 
                long fileSize, 
                IFileDownloader downloader, 
                boolean useZip64)

พารามิเตอร์
remoteFilePath String

fileSize long

downloader IFileDownloader

useZip64 boolean

RemoteZip

public RemoteZip (String remoteFilePath, 
                long fileSize, 
                IFileDownloader downloader, 
                boolean useZip64, 
                boolean useCache)

เครื่องมือสร้าง

พารามิเตอร์
remoteFilePath String: เส้นทางระยะไกลไปยังไฟล์ที่จะดาวน์โหลด

fileSize long: ขนาดของไฟล์ระยะไกล

downloader IFileDownloader: @{link IFileDownloader} ที่ใช้ดาวน์โหลดไฟล์ระยะไกล

useZip64 boolean: จะใช้รูปแบบ zip64 สำหรับการดาวน์โหลดบางส่วนหรือไม่

useCache boolean

เมธอดสาธารณะ

downloadFiles

public void downloadFiles (File destDir, 
                List<CentralDirectoryInfo> originalFiles)

ดาวน์โหลดไฟล์ที่ระบุในไฟล์ ZIP ระยะไกล

พารามิเตอร์
destDir File: ไดเรกทอรีที่จะวางไฟล์ที่ดาวน์โหลด

originalFiles List: รายการรายการที่จะดาวน์โหลดจากไฟล์ ZIP ระยะไกล

ส่ง
com.android.tradefed.build.BuildRetrievalError
java.io.IOException
BuildRetrievalError
IOException

getLastAccess

public long getLastAccess ()

รับเวลาที่เข้าถึงออบเจ็กต์นี้ครั้งล่าสุด

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

getRemoteFilePath

public String getRemoteFilePath ()

รับเส้นทางไฟล์ระยะไกลของอาร์ติแฟกต์ ZIP ระยะไกล

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

getZipEntries

public List<CentralDirectoryInfo> getZipEntries ()

รับรายการไฟล์ ZIP ของไฟล์ ZIP ระยะไกล

การคืนสินค้า
List<CentralDirectoryInfo>

ส่ง
BuildRetrievalError หากดาวน์โหลดไฟล์ไม่ได้
IOException

setLastAccess

public void setLastAccess (long timestamp)

อัปเดตการประทับเวลาการเข้าถึงครั้งล่าสุดของออบเจ็กต์

พารามิเตอร์
timestamp long