Class URLDownloader
- java.lang.Object
-
- jetbrains.buildServer.tools.utils.URLDownloader
-
public class URLDownloader extends Object
User: vbedrosova Date: 29.12.2009 Time: 14:56:17
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
URLDownloader.DownloadException
-
Constructor Summary
Constructors Constructor Description URLDownloader()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
download(String source, File dest)
Deprecated.since 2018.1.2.static org.apache.http.HttpResponse
download(String source, File dest, Long lastModified, String etag)
Deprecated.static org.apache.http.HttpResponse
download(String source, File dest, Consumer<org.apache.http.client.methods.HttpRequestBase> requestModifier)
Deprecated.static void
download(String source, KeyStore trustStore, File dest)
Download content of given source URL to given destination file.static HTTPRequestBuilder.Response
download(String source, KeyStore trustStore, File dest, Consumer<HTTPRequestBuilder> requestBuilderCustomizer)
Download content of given source URL to given destination file.
-
-
-
Method Detail
-
download
public static void download(@NotNull String source, @Nullable KeyStore trustStore, @NotNull File dest) throws URLDownloader.DownloadException
Download content of given source URL to given destination file.- Parameters:
source
- url of contenttrustStore
- custom trusted certificatesdest
- where store response data- Throws:
URLDownloader.DownloadException
- in case of any exception
-
download
@NotNull public static HTTPRequestBuilder.Response download(@NotNull String source, @Nullable KeyStore trustStore, @NotNull File dest, @NotNull Consumer<HTTPRequestBuilder> requestBuilderCustomizer)
Download content of given source URL to given destination file.- Parameters:
source
- url of contenttrustStore
- custom trusted certificatesdest
- where store response datarequestBuilderCustomizer
- allows to customize HTTP Request builder before request is constructed- Returns:
- response object
- Throws:
URLDownloader.DownloadException
- in case of any exception- Since:
- 2020.1.4
-
download
@Deprecated public static void download(@NotNull String source, @NotNull File dest) throws URLDownloader.DownloadException
Deprecated.since 2018.1.2. Usedownload(java.lang.String, java.security.KeyStore, java.io.File)
instead.Download content of given source URL to given destination file. Make maximum DOWNLOAD_TRY_NUMBER attempts.- Throws:
URLDownloader.DownloadException
-
download
@Deprecated public static org.apache.http.HttpResponse download(@NotNull String source, @NotNull File dest, @Nullable Long lastModified, @Nullable String etag) throws URLDownloader.DownloadException
Deprecated.- Throws:
URLDownloader.DownloadException
-
download
@Deprecated public static org.apache.http.HttpResponse download(@NotNull String source, @NotNull File dest, @Nullable Consumer<org.apache.http.client.methods.HttpRequestBase> requestModifier) throws URLDownloader.DownloadException
Deprecated.- Throws:
URLDownloader.DownloadException
-
-