Package com.atlassian.confluence.util.io
Interface InputStreamSource
@ExperimentalApi
public interface InputStreamSource
Provides an
InputStream
. This interface can be conveniently passed as an argument to other methods. Passing
the InputStream
directly is confusing because it inhibits the usage of try-with-resource statement and is
sometime not clear who will be responsible for closing the stream.- Since:
- 6.5
-
Method Summary
-
Method Details
-
getInputStream
Obtains anInputStream
. It is expected that each call creates a fresh stream so it is a responsibility of the caller to close the returned stream after using it either explicitly or by using try-with-resource statement.- Throws:
IOException
-