public interface Streamable
OutputStream
.Modifier and Type | Method and Description |
---|---|
default void |
writeTo(File file)
|
default void |
writeTo(OutputStream outputStream)
Write this object to the given
OutputStream using StandardCharsets.UTF_8 by default. |
void |
writeTo(OutputStream outputStream,
Charset charset)
Write this object to the given
OutputStream using StandardCharsets.UTF_8 by default. |
void writeTo(OutputStream outputStream, @Nullable Charset charset) throws IOException
OutputStream
using StandardCharsets.UTF_8
by default.outputStream
- The output streamcharset
- The charset to use. Defaults to StandardCharsets.UTF_8
IOException
- if an error occurred while outputting data to the writerdefault void writeTo(File file) throws IOException
file
- The fileIOException
- if an error occurred while outputting data to the writerdefault void writeTo(OutputStream outputStream) throws IOException
OutputStream
using StandardCharsets.UTF_8
by default.outputStream
- The output streamIOException
- if an error occurred while outputting data to the writer