RemoteZip
public
class
RemoteZip
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.RemoteZip |
用于解压缩远程 ZIP 文件中的各个文件的实用程序。
摘要
公共构造函数 | |
|---|---|
RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64)
构造函数 |
|
RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader)
构造函数 |
|
公共方法 | |
|---|---|
void
|
downloadFiles(File destDir,
下载远程 ZIP 文件中的指定文件。 |
long
|
getLastAccess()
获取上次访问此对象的时间。 |
String
|
getRemoteFilePath()
获取远程 ZIP 工件的远程文件路径。 |
|
getZipEntries()
获取远程 ZIP 文件的 ZIP 文件条目。 |
void
|
setLastAccess(long timestamp)
更新对象的上次访问时间戳。 |
公共构造函数
RemoteZip
public RemoteZip (String remoteFilePath,
long fileSize,
IFileDownloader downloader,
boolean useZip64)构造函数
| 参数 | |
|---|---|
remoteFilePath |
String:要下载的文件的远程路径。 |
fileSize |
long:远程文件的大小。 |
downloader |
IFileDownloader:用于下载远程文件的 @{link IFileDownloader}。 |
useZip64 |
boolean:是否使用 zip64 格式进行部分下载。 |
RemoteZip
public RemoteZip (String remoteFilePath,
long fileSize,
IFileDownloader downloader)构造函数
| 参数 | |
|---|---|
remoteFilePath |
String:要下载的文件的远程路径。 |
fileSize |
long:远程文件的大小。 |
downloader |
IFileDownloader:用于下载远程文件的 @{link IFileDownloader}。 |
公共方法
downloadFiles
public void downloadFiles (File destDir,
files) 下载远程 ZIP 文件中的指定文件。
| 参数 | |
|---|---|
destDir |
File:用于放置下载文件的目录。 |
files |
:要从远程 zip 文件下载的条目列表。 |
| 抛出 | |
|---|---|
|
com.android.tradefed.build.BuildRetrievalError |
BuildRetrievalError |
|
getLastAccess
public long getLastAccess ()
获取上次访问此对象的时间。
| 返回 | |
|---|---|
long |
|
getRemoteFilePath
public String getRemoteFilePath ()
获取远程 ZIP 工件的远程文件路径。
| 返回 | |
|---|---|
String |
|
setLastAccess
public void setLastAccess (long timestamp)
更新对象的上次访问时间戳。
| 参数 | |
|---|---|
timestamp |
long |