public static final class StartDownloadCallback.Action extends AsyncCallbackAction<com.teamdev.jxbrowser.download.internal.rpc.StartDownload.Response>
StartDownloadCallback
.Constructor and Description |
---|
Action(java.util.function.Consumer<com.teamdev.jxbrowser.download.internal.rpc.StartDownload.Response> consumer) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Notifies the engine that the file download should be canceled.
|
void |
download(java.nio.file.Path destFilePath)
Notifies the engine that the file should be downloaded into the given target path.
|
isClosed
public Action(java.util.function.Consumer<com.teamdev.jxbrowser.download.internal.rpc.StartDownload.Response> consumer)
public void download(java.nio.file.Path destFilePath)
destFilePath
- the absolute or relative path to the target file. The engine must
have the write permissions on the target filepublic void cancel()