Interface AttachmentResolver
-
- All Known Implementing Classes:
AttachmentCache
public interface AttachmentResolver
Provides access to the physical content of attachments (i.e. the actual bytes). Use theRichTextUtils.createAttachmentResolver()
methods to get an instance of the interface.Client is required to call the
dispose()
method once theAttachmentResolver
is not to be used anymore, as this may free temporary resources created by the resolver.Clients may implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose()
Disposes the instance, which shall free any resource used.InputStream
getInputStream(Attachment attachment)
Returns a stream to read the content of the specified attachment.
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream(Attachment attachment) throws IOException
Returns a stream to read the content of the specified attachment.- Parameters:
attachment
- the logical attachment for which content is to be accessed.- Returns:
- a stream to access the content of the attachment
- Throws:
IOException
- 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.
-
-