RemoteZip
public
class
RemoteZip
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.RemoteZip |
Các tiện ích để giải nén từng tệp riêng lẻ trong tệp zip từ xa.
Tóm tắt
Hàm khởi tạo công khai | |
|---|---|
RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader)
Hàm dựng |
|
RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64)
|
|
RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64, boolean useCache)
Hàm dựng |
|
Phương thức công khai | |
|---|---|
void
|
downloadFiles(File destDir,
Tải các tệp được chỉ định trong tệp zip từ xa xuống. |
long
|
getLastAccess()
Lấy thời điểm truy cập gần đây nhất vào đối tượng này. |
String
|
getRemoteFilePath()
Lấy đường dẫn tệp từ xa của cấu phần phần mề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 gần đây nhất của đối tượng. |
Hàm khởi tạo công khai
RemoteZip
public RemoteZip (String remoteFilePath,
long fileSize,
IFileDownloader downloader)Hàm dựng
| Tham số | |
|---|---|
remoteFilePath |
String: đường dẫn từ xa đến tệp cần tải xuống. |
fileSize |
long: kích thước của tệp từ xa. |
downloader |
IFileDownloader: một @{link IFileDownloader} dùng để tải tệp từ xa xuống. |
RemoteZip
public RemoteZip (String remoteFilePath,
long fileSize,
IFileDownloader downloader,
boolean useZip64)| Tham số | |
|---|---|
remoteFilePath |
String |
fileSize |
long |
downloader |
IFileDownloader |
useZip64 |
boolean |
RemoteZip
public RemoteZip (String remoteFilePath,
long fileSize,
IFileDownloader downloader,
boolean useZip64,
boolean useCache)Hàm dựng
| Tham số | |
|---|---|
remoteFilePath |
String: đường dẫn từ xa đến tệp cần tải xuống. |
fileSize |
long: kích thước của tệp từ xa. |
downloader |
IFileDownloader: một @{link IFileDownloader} dùng để tải tệp từ xa xuống. |
useZip64 |
boolean: có sử dụng định dạng zip64 để tải một phần xuống hay không. |
useCache |
boolean |
Phương thức công khai
downloadFiles
public void downloadFiles (File destDir,
originalFiles) Tải các tệp được chỉ định trong tệp zip từ xa xuống.
| Tham số | |
|---|---|
destDir |
File: thư mục để đặt các tệp đã tải xuống. |
originalFiles |
: danh sách các mục cần tải xuống từ tệp zip từ xa. |
| Gửi | |
|---|---|
|
com.android.tradefed.build.BuildRetrievalError |
|
IOException |
BuildRetrievalError |
|
getLastAccess
public long getLastAccess ()
Lấy thời điểm truy cập gần đây nhất vào đối tượng này.
| Giá trị trả về | |
|---|---|
long |
|
getRemoteFilePath
public String getRemoteFilePath ()
Lấy đường dẫn tệp từ xa của cấu phần phần mềm zip từ xa.
| Giá trị trả về | |
|---|---|
String |
|
getZipEntries
publicgetZipEntries ()
Lấy các mục nhập tệp zip của tệp zip từ xa.
| Giá trị trả về | |
|---|---|
|
|
| Gửi | |
|---|---|
BuildRetrievalError |
nếu không tải được tệp xuống. |
setLastAccess
public void setLastAccess (long timestamp)
Cập nhật dấu thời gian truy cập gần đây nhất của đối tượng.
| Tham số | |
|---|---|
timestamp |
long |