@ExperimentalApi public class


extends Object
   ↳ com.atlassian.jira.io.MediaConsumer


This class is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Class Overview

Consumes a media stream and its type.

The media type has to be represented by String instead of MediaType because of JIRA OSGi limitations. The jira-api module cannot import classes from OSGi. Providing that class would cause ClassCastExceptions for clients importing it from OSGi.


Public Constructors
MediaConsumer(Consumer<String> contentTypeConsumer, Consumer<InputStream> dataConsumer)
MediaConsumer(Consumer<InputStream> dataConsumer)
Public Methods
void consumeContentType(String contentType)
void consumeData(InputStream inputStream)
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaConsumer (Consumer<String> contentTypeConsumer, Consumer<InputStream> dataConsumer)

public MediaConsumer (Consumer<InputStream> dataConsumer)

Public Methods

public void consumeContentType (String contentType)

public void consumeData (InputStream inputStream)