Package org.gnome.gio

Class OutputStream

java.lang.Object
All Implemented Interfaces:
Proxy, AutoCloseable, AutoCloseable
Direct Known Subclasses:
FileOutputStream, FilterOutputStream, MemoryOutputStream, OutputStream.OutputStreamImpl, PollableOutputStream.PollableOutputStreamImpl, UnixOutputStream, Win32OutputStream

@Generated("io.github.jwharm.JavaGI") public abstract class OutputStream extends GObject implements AutoCloseable
GOutputStream is a base class for implementing streaming output.

It has functions to write to a stream (write(byte[], org.gnome.gio.Cancellable)), to close a stream (close(org.gnome.gio.Cancellable)) and to flush pending writes (flush(org.gnome.gio.Cancellable)).

To copy the content of an input stream to an output stream without manually handling the reads and writes, use splice(org.gnome.gio.InputStream, java.util.Set<org.gnome.gio.OutputStreamSpliceFlags>, org.gnome.gio.Cancellable).

See the documentation for IOStream for details of thread safety of streaming APIs.

All of these functions have async variants too.

All classes derived from GOutputStream should implement synchronous writing, splicing, flushing and closing streams, but may implement asynchronous versions.