to top
public class

FileDownloadCacheWrapper

extends Object
implements IFileDownloader
java.lang.Object
   ↳ com.android.tradefed.build.FileDownloadCacheWrapper

Class Overview

A wrapper class that provides FileDownloadCache facilities while implementing the IFileDownloader interface.

Useful for cases where you want to abstract the use of the cache from callers.

Summary

Public Constructors
FileDownloadCacheWrapper(File cacheDir, IFileDownloader delegateDownloader)
Public Methods
void downloadFile(String remotePath, File destFile)
Alternate form of downloadFile(String), that allows caller to specify the destination file the remote contents should be placed in.
File downloadFile(String remoteFilePath)
Downloads a remote file to a temporary file on local disk.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.tradefed.build.IFileDownloader

Public Constructors

public FileDownloadCacheWrapper (File cacheDir, IFileDownloader delegateDownloader)

Parameters
cacheDir File
delegateDownloader IFileDownloader

Public Methods

public void downloadFile (String remotePath, File destFile)

Alternate form of downloadFile(String), that allows caller to specify the destination file the remote contents should be placed in.

Parameters
remotePath String: the remote path to the file to download, relative to an implementation-specific root.
destFile File: the file to place the downloaded contents into. Should not exist.
Throws
BuildRetrievalError

public File downloadFile (String remoteFilePath)

Downloads a remote file to a temporary file on local disk.

Parameters
remoteFilePath String: the remote path to the file to download, relative to a implementation specific root.
Returns
File the temporary local downloaded File.
Throws
BuildRetrievalError