null
if no URLwas specified.
@throws IllegalStateException if the URL has not been set before calling this method
@throws IOException
This method does not close the given output stream.
This method is not reentrant. A new instance of {@link MediaHttpDownloader} must beinstantiated before download called be called again.
@param requestUrl The request URL where the download requests will be sent @param outputStream destination output streamThis method closes the content of the HTTP response from {@link #getContent()}.
This method does not close the given output stream.
@param outputStream destination output stream @throws IOException I/O exception @since 1.9If this connection is lost, we'll abort the channel.
The resolver will always make a best effort, and do not stop when an artifact is not available. It rather continue to attempt to download other requested artifacts, and report what has been done in the returned DownloadReport.
The returned DownloadReport is never null
, and always contain an {@link ArtifactDownloadReport} for each requested Artifact.
null
.
@param options options to apply for this download. Must not be null
.
@return a DownloadReport with details about each Artifact download.
final Future<?> future = task.download(...); Runnable runAfterTask = new Runnable() { public void run() { // this is not strictly necessary because of the type of executor service // Main.worker is initialized with, but it doesn't harm either // future.get(); // wait for the download task to complete doSomethingAfterTheTaskCompleted(); } } Main.worker.submit(runAfterTask);@param newLayer true, if the data is to be downloaded into a new layer. If false, the taskselects one of the existing layers as download layer, preferably the active layer. @param downloadArea the area to download @param progressMonitor the progressMonitor @return the future representing the asynchronous task
The file is either downloaded completely or nothing at all. In the latter case, a {@code StorageException} is thrown.
Implementations must make sure that if a file matches the specified name schema, it must be complete and consistent.
If remoteFile does not exist, a {@link StorageFileNotFoundException} is thrown. @param remoteFile Existing source file on the remote storage.The only required property of the remote file is the name. @param localFile Not existing local file to which the remote file isgoing to be downloaded. @throws StorageException If the connection fails due to no Internet connection,authentication errors, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|