Package com.atlassian.bitbucket.io
Interface TypeAwareOutputSupplier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Supplies an
OutputStream
after receiving the content type for the data that will be streamed to it.-
Method Summary
Modifier and TypeMethodDescriptionReturns anOutputStream
, given the supplied content type.
-
Method Details
-
getStream
Returns anOutputStream
, given the supplied content type. This gives the implementation a chance to act on the content type, perhaps setting HTTP headers or preparing to validate the streamed data.- Parameters:
contentType
- the content type for the data that will be written to the stream- Returns:
- a stream the caller can write content to
- Throws:
IOException
- if a stream cannot be provided
-