Package org.apache.wiki.attachment

## Interface DynamicAttachmentProvider

    public interface DynamicAttachmentProvider

Provides the data for an attachment. Please note that there will be a strong reference retained for the provider for each Attachment it provides, so do try to keep the object light. Also, reuse objects if possible.

The Provider needs to be thread-safe.

Since:
  2.5.34

### Method Summary

All Methods Instance Methods Abstract Methods
`java.io.InputStream` `getAttachmentData​(Context context, Attachment att)` Returns a stream of data for this attachment.

### Method Detail

#### getAttachmentData

    java.io.InputStream getAttachmentData​(Context context,
                                          Attachment att)
                                   throws ProviderException,
                                          java.io.IOException

Returns a stream of data for this attachment. The stream will be closed by AttachmentServlet.

Parameters:
  `context` - A Wiki Context
  `att` - The Attachment for which the data should be received.
Returns:
  InputStream for the data.
Throws:
  `ProviderException` - If something goes wrong internally
  `java.io.IOException` - If something goes wrong when reading the data