public class DependenciesDownloaderHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DependenciesDownloaderHelper.ArtifactMetaData |
| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_SIZE_FOR_CONCURRENT_DOWNLOAD
Minimum file size for concurrent download
|
| Constructor and Description |
|---|
DependenciesDownloaderHelper(ArtifactoryManager artifactoryManager,
java.lang.String workingDirectory,
org.jfrog.build.api.util.Log log) |
DependenciesDownloaderHelper(DependenciesDownloader downloader,
org.jfrog.build.api.util.Log log) |
| Modifier and Type | Method and Description |
|---|---|
protected DependenciesDownloaderHelper.ArtifactMetaData |
downloadArtifactMetaData(java.lang.String url) |
java.util.List<Dependency> |
downloadDependencies(org.jfrog.filespecs.FileSpec downloadSpec)
Download dependencies by the provided spec using the provided in the constructor client.
|
java.util.List<Dependency> |
downloadDependencies(java.util.Set<org.jfrog.build.api.dependency.DownloadableArtifact> downloadableArtifacts) |
protected java.util.Map<java.lang.String,java.lang.String> |
downloadFile(java.lang.String downloadPath,
java.lang.String fileDestination) |
protected java.util.Map<java.lang.String,java.lang.String> |
downloadFileConcurrently(java.lang.String uriWithParams,
long fileSize,
java.lang.String fileDestination,
java.lang.String filePath)
Download an artifact using
CONCURRENT_DOWNLOAD_THREADS multiple threads. |
static java.io.File |
saveInputStreamToFile(java.io.InputStream inputStream,
java.lang.String filePath) |
public static final int MIN_SIZE_FOR_CONCURRENT_DOWNLOAD
public DependenciesDownloaderHelper(DependenciesDownloader downloader, org.jfrog.build.api.util.Log log)
public DependenciesDownloaderHelper(ArtifactoryManager artifactoryManager, java.lang.String workingDirectory, org.jfrog.build.api.util.Log log)
public java.util.List<Dependency> downloadDependencies(org.jfrog.filespecs.FileSpec downloadSpec) throws java.io.IOException
downloadSpec - the download specjava.io.IOException - in case of IO errorpublic java.util.List<Dependency> downloadDependencies(java.util.Set<org.jfrog.build.api.dependency.DownloadableArtifact> downloadableArtifacts) throws java.io.IOException
java.io.IOExceptionprotected java.util.Map<java.lang.String,java.lang.String> downloadFile(java.lang.String downloadPath,
java.lang.String fileDestination)
throws java.io.IOException
java.io.IOExceptionprotected java.util.Map<java.lang.String,java.lang.String> downloadFileConcurrently(java.lang.String uriWithParams,
long fileSize,
java.lang.String fileDestination,
java.lang.String filePath)
throws java.lang.Exception
CONCURRENT_DOWNLOAD_THREADS multiple threads.
This method will be used for artifacts of size larger than MIN_SIZE_FOR_CONCURRENT_DOWNLOAD.uriWithParams - the request urifileSize - in bytes, used for setting the download rangesfileDestination - location of saving the downloaded file in the file systemfilePath - path of the downloaded filejava.lang.Exceptionprotected DependenciesDownloaderHelper.ArtifactMetaData downloadArtifactMetaData(java.lang.String url) throws java.io.IOException
java.io.IOExceptionpublic static java.io.File saveInputStreamToFile(java.io.InputStream inputStream,
java.lang.String filePath)
throws java.io.IOException
java.io.IOException