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