Package com.helger.commons.io
Interface IWriteToStream
- All Known Implementing Classes:
ByteBufferOutputStream,NonBlockingByteArrayOutputStream
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A simple interface for objects that can write to an
OutputStream.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionvoidwriteTo(OutputStream aOS) Write everything to the passed output stream.default voidWrite everything to the passed output stream and close it.
-
Method Details
-
writeTo
Write everything to the passed output stream.- Parameters:
aOS- The output stream to write to. May not benull. The OutputStream must not closed by implementations of this class.- Throws:
IOException- In case of IO error
-
writeToAndClose
Write everything to the passed output stream and close it.- Parameters:
aOS- The output stream to write to. May not benull.- Throws:
IOException- In case of IO error. Even than the OutputStream is closed!
-