public class DownloadingAttachmentHandler extends Object implements AttachmentHandler
AttachmentHandler that mimics how browsers handle attachments, specifically
| Constructor and Description |
|---|
DownloadingAttachmentHandler()
Creates a new DownloadingAttachmentHandler that stores all downloaded files in the
'temp'-dir (System.getProperty("java.io.tmpdir")).
|
DownloadingAttachmentHandler(Path downloadFolder)
Creates a new DownloadingAttachmentHandler that stores all downloaded files in the
provided directory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleAttachment(Page page,
String attachmentFilename)
Handles the specified attached page.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleAttachment, isAttachmentpublic DownloadingAttachmentHandler(Path downloadFolder) throws IOException
downloadFolder - the path to the folder for storing all downloaded filesIOException - if the folder does not exist or the folder is not writablepublic DownloadingAttachmentHandler()
throws IOException
IOException - if the folder does not exist or the folder is not writablepublic void handleAttachment(Page page, String attachmentFilename)
AttachmentHandler.handleAttachment(WebResponse, String)
has returned false for the response.handleAttachment in interface AttachmentHandlerpage - an attached page, which doesn't get loaded inlineattachmentFilename - the filename to use for the attachment or null if unspecifiedCopyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.