Class DownloadCache
java.lang.Object
org.sonarsource.scanner.downloadcache.DownloadCache
This class is responsible for managing Sonar Scanner download cache. You can download files into the cache and
later try to retrieve them. The file hash is used as the cache index (name is not reliable as files may come
from different SonarQube servers and have the same name but be actually different).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLook for a file in the cache by its filename and hash.getOrDownload(String filename, String expectedFileHash, String hashAlgorithm, Downloader downloader)
-
Constructor Details
-
DownloadCache
-
-
Method Details
-
getBaseDir
-
get
Look for a file in the cache by its filename and hash. If the file is not present, then return empty. -
getOrDownload
public CachedFile getOrDownload(String filename, String expectedFileHash, String hashAlgorithm, Downloader downloader) throws HashMismatchException - Throws:
HashMismatchException
-