Class HTMLContext.CloseIgnoringAttachment

    • Constructor Detail

      • CloseIgnoringAttachment

        protected CloseIgnoringAttachment​(HTMLContext.Attachment wrapped)
        Creates a new Attachment that ignores closing.
        Parameters:
        wrapped - The wrapped Attachment.
    • Method Detail

      • unwrap

        public HTMLContext.Attachment unwrap()
        Description copied from interface: WrappingProxy
        Gets 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 of WrappingProxy again.
        Specified by:
        unwrap in interface WrappingProxy
        Returns:
        The object that is wrapped by a proxy. Since this object has to exist, null will never be returned.
      • getData

        @Deprecated(since="15.0.0",
                    forRemoval=true)
        public InputStream getData()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from class: HTMLContext.Attachment
        Gets the actual data as input stream; this is the content of the corresponding body part of the multipart.
        Overrides:
        getData in class HTMLContext.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 IOException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from class: HTMLContext.Attachment
        Gets the actual data as input stream. This method can be called several times returning the same input for every call.
        Users have to InputStream.close() the returned stream!
        Overrides:
        getDataRereadable in class HTMLContext.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 new InputStream for the attachment data, an IOException will be thrown.
      • getInputStream

        public InputStream getInputStream()
                                   throws IOException
        Description copied from class: HTMLContext.Attachment
        Gets the actual data as input stream. This method can be called several times returning the same input for every call.
        Users have to InputStream.close() the returned stream!
        Overrides:
        getInputStream in class HTMLContext.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 new InputStream for the attachment data, an IOException will be thrown.
      • getHeaderData

        public Map<String,​String> getHeaderData()
        Description copied from class: HTMLContext.Attachment
        Gets 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:
        getHeaderData in class HTMLContext.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:
        Header