Google is committed to advancing racial equity for Black communities. See how.

RemoteZip

public class RemoteZip
extends Object

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


Utilities to unzip individual files inside a remote zip file.

Summary

Public constructors

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

Constructor

RemoteZip(String remoteFilePath, long fileSize, IFileDownloader downloader)

Constructor

Public methods

void downloadFiles(File destDir, files)

Download the specified files in the remote zip file.

long getLastAccess()

Get the last time this object is accessed.

String getRemoteFilePath()

Get the remote file path of the remote zip artifact.

getZipEntries()

Gets the zip file entries of a remote zip file.

void setLastAccess(long timestamp)

Update the last access timestamp of the object.

Public constructors

RemoteZip

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

Constructor

Parameters
remoteFilePath String: the remote path to the file to download.

fileSize long: size of the remote file.

downloader IFileDownloader: a @{link IFileDownloader} used to download a remote file.

useZip64 boolean: whether to use zip64 format for partial download or not.

RemoteZip

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

Constructor

Parameters
remoteFilePath String: the remote path to the file to download.

fileSize long: size of the remote file.

downloader IFileDownloader: a @{link IFileDownloader} used to download a remote file.

Public methods

downloadFiles

public void downloadFiles (File destDir, 
                 files)

Download the specified files in the remote zip file.

Parameters
destDir File: the directory to place the downloaded files to.

files : a list of entries to download from the remote zip file.

Throws
com.android.tradefed.build.BuildRetrievalError
BuildRetrievalError

getLastAccess

public long getLastAccess ()

Get the last time this object is accessed.

Returns
long

getRemoteFilePath

public String getRemoteFilePath ()

Get the remote file path of the remote zip artifact.

Returns
String

getZipEntries

public  getZipEntries ()

Gets the zip file entries of a remote zip file.

Returns

Throws
BuildRetrievalError if file could not be downloaded.

setLastAccess

public void setLastAccess (long timestamp)

Update the last access timestamp of the object.

Parameters
timestamp long