public interface DownloadHandler
allowDownload(DownloadItem)method will be used to check whether this file can be downloaded. If this method returns
TRUE, the file download is started. You can use this handler to suppress all file downloads or download only files with a specific mime type.
boolean allowDownload(DownloadItem download)
downloadparameter contains all information about the the file which is going to be downloaded. To suppress file download, this method must return
FALSE. By default the file will be downloaded into application's working directory. You can get the absolute file path using the
DownloadItem.getDestinationFile()method. In order to change the destination path, you can use the
download- information about the file that will be downloaded.
TRUEto allow downloading the file or
FALSEto suppress it.