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

Modifier and Type
Method
Description
`InputStream`
`getAttachmentData(Context context, Attachment att)`
Returns a stream of data for this attachment.

## Method Details

### getAttachmentData

InputStream getAttachmentData(Context context, Attachment att) throws ProviderException, 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
  `IOException` - If something goes wrong when reading the data