public class HttpDownloader extends Object implements Downloader, AuthAwareDownloader
DEFAULT_NAME| Constructor and Description |
|---|
HttpDownloader() |
HttpDownloader(Optional<Proxy> proxy) |
| Modifier and Type | Method and Description |
|---|---|
protected HttpURLConnection |
createConnection(URI uri) |
boolean |
fetch(BuckEventBus eventBus,
URI uri,
Optional<PasswordAuthentication> authentication,
Path output) |
boolean |
fetch(BuckEventBus eventBus,
URI uri,
Path output)
Download the given URL and, upon a successful download, place it in
output. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamepublic boolean fetch(BuckEventBus eventBus, URI uri, Path output) throws IOException
Downloaderoutput. Note that
if a Downloader can't handle the URI.scheme then false will be
returned.fetch in interface DownloaderIOException - Should an exception be thrown when downloading.public boolean fetch(BuckEventBus eventBus, URI uri, Optional<PasswordAuthentication> authentication, Path output) throws IOException
fetch in interface AuthAwareDownloaderIOExceptionprotected HttpURLConnection createConnection(URI uri) throws IOException
IOException