远程压缩
public class RemoteZip
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.RemoteZip |
用于解压缩远程 zip 文件中的单个文件的实用程序。
概括
公共构造函数 | |
---|---|
RemoteZip (String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64, boolean useCache) 构造函数 | |
RemoteZip (String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64) | |
RemoteZip (String remoteFilePath, long fileSize, IFileDownloader downloader) 构造函数 |
公共方法 | |
---|---|
void | downloadFiles (File destDir, files) downloadFiles (File destDir, files) 下载远程 zip 文件中的指定文件。 |
long | getLastAccess () 获取该对象最后一次被访问的时间。 |
String | getRemoteFilePath () 获取远程 zip 工件的远程文件路径。 |
getZipEntries () 获取远程 zip 文件的 zip 文件条目。 | |
void | setLastAccess (long timestamp) 更新对象的上次访问时间戳。 |
公共构造函数
远程压缩
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 |
远程压缩
public RemoteZip (String remoteFilePath, long fileSize, IFileDownloader downloader, boolean useZip64)
参数 | |
---|---|
remoteFilePath | String |
fileSize | long |
downloader | IFileDownloader |
useZip64 | boolean |
远程压缩
public RemoteZip (String remoteFilePath, long fileSize, IFileDownloader downloader)
构造函数
参数 | |
---|---|
remoteFilePath | String :要下载的文件的远程路径。 |
fileSize | long :远程文件的大小。 |
downloader | IFileDownloader :用于下载远程文件的@{link IFileDownloader}。 |
公共方法
下载文件
public void downloadFiles (File destDir,files)
下载远程 zip 文件中的指定文件。
参数 | |
---|---|
destDir | File :放置下载文件的目录。 |
files |
投掷 | |
---|---|
| com.android.tradefed.build.BuildRetrievalError |
| IO异常 |
BuildRetrievalError |
获取最后访问权限
public long getLastAccess ()
获取该对象最后一次被访问的时间。
退货 | |
---|---|
long |
获取远程文件路径
public String getRemoteFilePath ()
获取远程 zip 工件的远程文件路径。
退货 | |
---|---|
String |
设置最后访问时间
public void setLastAccess (long timestamp)
更新对象的上次访问时间戳。
参数 | |
---|---|
timestamp | long |