public interface DownloadHandler
A callback interface for downloads handled by a “fetch resources” operation, which downloads all resources referenced by a given HTML input. This callback is used when HtmlElement.fetchResources(File, FetchOptions) is executed, or when the HtmlParserSettings.fetchResourcesBeforeParsing(FetchOptions) is used, where FetchOptions.getDownloadHandler() returns a non-null value.
DownloadContext,
FetchOptions,
HtmlElement,
HtmlParserSettings| Modifier and Type | Method and Description |
|---|---|
void |
nextDownload(DownloadContext context)
Informs the user that a resource is ready to be downloaded.
|
void nextDownload(DownloadContext context)
Informs the user that a resource is ready to be downloaded. Use the context object to control the process. For example, you can use DownloadContext.targetFileExtension() to prevent the download of certain types of files - just call DownloadContext.skipDownload() to prevent the download from happening.
context - an object with all information available about the download to performed, and options to skip or cancel the fetch operation altogetherCopyright © 2018 uniVocity Software Pty Ltd. All rights reserved.