RemoteZip

public class RemoteZip
extends Object

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


Các tiện ích để giải nén các tệp riêng lẻ bên trong một tệp zip từ xa.

Bản tóm tắt

Nhà thầu xây dựng công cộng

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

Người xây dựng

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

Người xây dựng

Phương pháp công khai

void downloadFiles (File destDir, originalFiles) downloadFiles (File destDir, originalFiles)

Tải xuống các tệp được chỉ định trong tệp zip từ xa.

long getLastAccess ()

Lấy lần cuối cùng đối tượng này được truy cập.

String getRemoteFilePath ()

Nhận đường dẫn tệp từ xa của tạo phẩm zip từ xa.

getZipEntries ()

Lấy các mục nhập tệp zip của tệp zip từ xa.

void setLastAccess (long timestamp)

Cập nhật dấu thời gian truy cập cuối cùng của đối tượng.

Nhà thầu xây dựng công cộng

RemoteZip

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

Người xây dựng

Thông số
remoteFilePath String : đường dẫn từ xa tới file cần tải xuống.

fileSize long : kích thước của tập tin từ xa.

downloader IFileDownloader : @{link IFileDownloader} được sử dụng để tải xuống tệp từ xa.

useZip64 boolean : có nên sử dụng định dạng zip64 để tải xuống một phần hay không.

useCache boolean

RemoteZip

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

Thông số
remoteFilePath String

fileSize long

downloader IFileDownloader

useZip64 boolean

RemoteZip

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

Người xây dựng

Thông số
remoteFilePath String : đường dẫn từ xa tới file cần tải xuống.

fileSize long : kích thước của tập tin từ xa.

downloader IFileDownloader : @{link IFileDownloader} được sử dụng để tải xuống tệp từ xa.

Phương pháp công khai

Tải tập tin

public void downloadFiles (File destDir, 
                 originalFiles)

Tải xuống các tệp được chỉ định trong tệp zip từ xa.

Thông số
destDir File : thư mục chứa các file đã tải về.

originalFiles : danh sách các mục cần tải xuống từ tệp zip từ xa.

Ném
com.android.tradefed.build.BuildRetrievalError
IOException
BuildRetrievalError

lấy quyền truy cập cuối cùng

public long getLastAccess ()

Lấy lần cuối cùng đối tượng này được truy cập.

Trả lại
long

getRemoteFilePath

public String getRemoteFilePath ()

Nhận đường dẫn tệp từ xa của tạo phẩm zip từ xa.

Trả lại
String

getZipEntries

public  getZipEntries ()

Lấy các mục nhập tệp zip của tệp zip từ xa.

Trả lại

Ném
BuildRetrievalError nếu tập tin không thể được tải về.

setLastAccess

public void setLastAccess (long timestamp)

Cập nhật dấu thời gian truy cập cuối cùng của đối tượng.

Thông số
timestamp long