Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, use android-latest-release. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
CasFileDownloader
public
class
CasFileDownloader
extends Object
implements
IFileDownloader
| java.lang.Object
|
| ↳ |
com.google.android.tradefed.util.CasFileDownloader
|
File downloader to download files from RBE CAS.
Summary
Public constructors |
CasFileDownloader(IFileDownloader fallbackDownloader, File manifestPath, boolean casAutoDiscovery, boolean casChunk, boolean casChunkDir)
Constructor for CasFileDownloader.
|
CasFileDownloader(IFileDownloader fallbackDownloader, File cacheDir, File manifestPath, boolean casAutoDiscovery, boolean casChunk, boolean casChunkDir, File casServiceAccountJson, File tempFileRoot, IRunUtil runUtil)
|
Public methods |
void
|
downloadFile(String remoteFilePath, File destFile, long startOffset, long size)
Alternate form of downloadFile(String,File), that allows caller to download a
section of the file and save to a specific destination file.
|
void
|
downloadFile(String relativeRemotePath, 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.
|
void
|
downloadZippedFiles(File destDir, String remoteFilePath, List<String> includeFilters, List<String> excludeFilters)
Download the files matching given filters in a remote zip file.
|
static
CasOptions
|
getCasOptions()
|
void
|
setCasChunksOptions(boolean casKeepChunks, boolean casChunksOnly)
|
void
|
setCasConcurrency(long casConcurrency)
|
void
|
setCasMemoryLimit(long casMemoryLimit)
|
void
|
setCasRpcTimeout(long casRpcTimeout, long casGetCapabilitiesTimeout, long casBatchUpdateBlobsTimeout, long casBatchReadBlobsTimeout, long casGetTreeTimeout)
|
Public constructors
CasFileDownloader
public CasFileDownloader (IFileDownloader fallbackDownloader,
File manifestPath,
boolean casAutoDiscovery,
boolean casChunk,
boolean casChunkDir)
Constructor for CasFileDownloader.
| Parameters |
fallbackDownloader |
IFileDownloader: the file downloader to use if the CAS file downloader fails to be
initialized or the file fails to be downloaded from CAS. |
manifestPath |
File |
casAutoDiscovery |
boolean |
casChunk |
boolean: whether to download the chunked version if both versions are available. |
casChunkDir |
boolean: whether to download the chunked version uncompressed as a directory. |
CasFileDownloader
public CasFileDownloader (IFileDownloader fallbackDownloader,
File cacheDir,
File manifestPath,
boolean casAutoDiscovery,
boolean casChunk,
boolean casChunkDir,
File casServiceAccountJson,
File tempFileRoot,
IRunUtil runUtil)
| Parameters |
fallbackDownloader |
IFileDownloader |
cacheDir |
File |
manifestPath |
File |
casAutoDiscovery |
boolean |
casChunk |
boolean |
casChunkDir |
boolean |
casServiceAccountJson |
File |
tempFileRoot |
File |
runUtil |
IRunUtil |
Public methods
downloadFile
public void downloadFile (String remoteFilePath,
File destFile,
long startOffset,
long size)
Alternate form of downloadFile(String,File), that allows caller to download a
section of the file and save to a specific destination file.
| Parameters |
remoteFilePath |
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. |
startOffset |
long: the start offset in the remote file. |
size |
long: the number of bytes to download from the remote file. Set it to a negative value
to download the whole file. |
downloadFile
public void downloadFile (String relativeRemotePath,
File destFile)
Alternate form of downloadFile(String), that allows caller to specify the
destination file the remote contents should be placed in.
| Parameters |
relativeRemotePath |
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. |
downloadFile
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. |
downloadZippedFiles
public void downloadZippedFiles (File destDir,
String remoteFilePath,
List<String> includeFilters,
List<String> excludeFilters)
Download the files matching given filters in a remote zip file.
A file inside the remote zip file is only downloaded to its path matches any of the
include filters but not the exclude filters.
| Parameters |
destDir |
File: the file to place the downloaded contents into. |
remoteFilePath |
String: the remote path to the file to download, relative to an implementation
specific root. |
includeFilters |
List: a list of filters to download matching files. |
excludeFilters |
List: a list of filters to skip downloading matching files. |
getCasOptions
public static CasOptions getCasOptions ()
setCasChunksOptions
public void setCasChunksOptions (boolean casKeepChunks,
boolean casChunksOnly)
| Parameters |
casKeepChunks |
boolean |
casChunksOnly |
boolean |
setCasConcurrency
public void setCasConcurrency (long casConcurrency)
| Parameters |
casConcurrency |
long |
setCasMemoryLimit
public void setCasMemoryLimit (long casMemoryLimit)
| Parameters |
casMemoryLimit |
long |
setCasRpcTimeout
public void setCasRpcTimeout (long casRpcTimeout,
long casGetCapabilitiesTimeout,
long casBatchUpdateBlobsTimeout,
long casBatchReadBlobsTimeout,
long casGetTreeTimeout)
| Parameters |
casRpcTimeout |
long |
casGetCapabilitiesTimeout |
long |
casBatchUpdateBlobsTimeout |
long |
casBatchReadBlobsTimeout |
long |
casGetTreeTimeout |
long |
Protected methods
protected File extractCasClient (String clientName)
| Parameters |
clientName |
String |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-06-22 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-22 UTC."],[],[]]