public class

StreamCopyingConsumer

extends Object
implements Consumer<T>
java.lang.Object
   ↳ com.atlassian.jira.util.StreamCopyingConsumer

Class Overview

Copies an java.io.InputStream to the configured java.io.OutputStream. If there is an IOException during the copy, this will be thrown from the consume method inside a RuntimeException, but either way the

Summary

Public Constructors
StreamCopyingConsumer(OutputStream outputStream, int bufferSize)
Copies the consumed InputStream into the given OutputStream (without closing anything).
Public Methods
void consume(InputStream inputStream)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.util.Consumer

Public Constructors

public StreamCopyingConsumer (OutputStream outputStream, int bufferSize)

Copies the consumed InputStream into the given OutputStream (without closing anything). If there is a problem copying, the IOException will be thrown wrapped in a RuntimeException.

Parameters
outputStream the OutputStream to copy to.
bufferSize the desired number of bytes in the copy buffer.

Public Methods

public void consume (InputStream inputStream)