Package com.atlassian.confluence.util.io
Interface InputStreamSource
-
@ExperimentalApi public interface InputStreamSource
Provides anInputStream
. This interface can be conveniently passed as an argument to other methods. Passing theInputStream
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStream
getInputStream()
Obtains anInputStream
.
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream() throws IOException
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
-
-