Interface AttachmentResolver


  • public interface AttachmentResolver
    Provides access to the physical content of attachments (i.e. the actual bytes). Use the RichTextUtils.createAttachmentResolver() methods to get an instance of the interface.

    Client is required to call the dispose() method once the AttachmentResolver is not to be used anymore, as this may free temporary resources created by the resolver.

    Clients may implement this interface.

    • Method Detail

      • getInputStream

        InputStream getInputStream​(Attachment attachment)
                            throws CoreException
        Returns a stream to read the content of the specified attachment.
        Parameters:
        attachment - the attachment for which content is to be accessed.
        Returns:
        a stream to access the content of the attachment
        Throws:
        CoreException - an exception if the physical content of the attachment cannot be found or if it failed to be accessed.
      • dispose

        void dispose()
        Disposes the instance, which shall free any resource used. The instance is no longer to be used once this method has been called.