Package de.aristaflow.adept2.ui.htmlgui
Class HTMLContext.CloseIgnoringAttachment
java.lang.Object
de.aristaflow.adept2.ui.htmlgui.HTMLContext.Attachment
de.aristaflow.adept2.ui.htmlgui.HTMLContext.CloseIgnoringAttachment
- All Implemented Interfaces:
WrappingProxy,Closeable,AutoCloseable
- Enclosing interface:
- HTMLContext
public static class HTMLContext.CloseIgnoringAttachment
extends HTMLContext.Attachment
implements WrappingProxy
-
Field Summary
FieldsFields inherited from class de.aristaflow.adept2.ui.htmlgui.HTMLContext.Attachment
cleanup, contentType, data, fileName, headerData, size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getData()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Gets all header data which is sent with the body part of the multipart this attachment stems from.Gets the actual data as input stream.unwrap()Gets the object instance that is wrapped by this proxy.Methods inherited from class de.aristaflow.adept2.ui.htmlgui.HTMLContext.Attachment
getContentType, getFileName, getSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.aristaflow.adept2.model.common.WrappingProxy
isWrapperFor, unwrap
-
Field Details
-
wrapped
The wrappedAttachment.
-
-
Constructor Details
-
CloseIgnoringAttachment
Creates a newAttachmentthat ignores closing.- Parameters:
wrapped- The wrappedAttachment.
-
-
Method Details
-
unwrap
Description copied from interface:WrappingProxyGets the object instance that is wrapped by this proxy. This simply unwraps, so there are no type checks. In case of a cascaded proxy, this may even be an instance ofWrappingProxyagain.- Specified by:
unwrapin interfaceWrappingProxy- Returns:
- The object that is wrapped by a proxy. Since this object has to exist,
nullwill never be returned.
-
getData
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:HTMLContext.AttachmentGets the actual data as input stream; this is the content of the corresponding body part of the multipart.- Overrides:
getDatain classHTMLContext.Attachment- Returns:
- The actual data of this attachment as provided as content of the body part.
-
getDataRereadable
@Deprecated(since="15.0.0", forRemoval=true) public InputStream getDataRereadable() throws IOExceptionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from class:HTMLContext.AttachmentGets the actual data as input stream. This method can be called several times returning the same input for every call.
Users have toInputStream.close()the returned stream!- Overrides:
getDataRereadablein classHTMLContext.Attachment- Returns:
- The actual data of this attachment as provided as content of the body part. The caller is responsible for closing.
- Throws:
IOException- If there are problems creating a newInputStreamfor the attachment data, anIOExceptionwill be thrown.
-
getInputStream
Description copied from class:HTMLContext.AttachmentGets the actual data as input stream. This method can be called several times returning the same input for every call.
Users have toInputStream.close()the returned stream!- Overrides:
getInputStreamin classHTMLContext.Attachment- Returns:
- The actual data of this attachment as provided as content of the body part. The caller is responsible for closing.
- Throws:
IOException- If there are problems creating a newInputStreamfor the attachment data, anIOExceptionwill be thrown.
-
getHeaderData
Description copied from class:HTMLContext.AttachmentGets all header data which is sent with the body part of the multipart this attachment stems from. The values of the header data may be arbitrary strings even containing key-value-pairs again. However, they are just provided as from the body part.- Overrides:
getHeaderDatain classHTMLContext.Attachment- Returns:
- All header data (mapping from header name to value) which is sent with the body part of the multipart this attachment stems from.
- See Also:
-
javax.mail.Header
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classHTMLContext.Attachment- Throws:
IOException
-