@FunctionalInterface public interface

TypeAwareOutputSupplier

com.atlassian.bitbucket.io.TypeAwareOutputSupplier

Class Overview

Supplies an OutputStream after receiving the content type for the data that will be streamed to it.

Summary

Public Methods
@Nonnull OutputStream getStream(String contentType)
Returns an OutputStream, given the supplied content type.

Public Methods

@Nonnull public OutputStream getStream (String contentType)

Returns an OutputStream, 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