Package io.micronaut.core.io
Interface Streamable
- All Known Subinterfaces:
Writable
- All Known Implementing Classes:
ConfigurationMetadata,PropertyMetadata
public interface Streamable
Interface for types that can be written to an
OutputStream.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddefault voidwriteTo(OutputStream outputStream) Write this object to the givenOutputStreamusingStandardCharsets.UTF_8by default.voidwriteTo(OutputStream outputStream, @Nullable Charset charset) Write this object to the givenOutputStreamusingStandardCharsets.UTF_8by default.
-
Method Details
-
writeTo
Write this object to the givenOutputStreamusingStandardCharsets.UTF_8by default.- Parameters:
outputStream- The output streamcharset- The charset to use. Defaults toStandardCharsets.UTF_8- Throws:
IOException- if an error occurred while outputting data to the writer
-
writeTo
- Parameters:
file- The file- Throws:
IOException- if an error occurred while outputting data to the writer
-
writeTo
Write this object to the givenOutputStreamusingStandardCharsets.UTF_8by default.- Parameters:
outputStream- The output stream- Throws:
IOException- if an error occurred while outputting data to the writer
-