ConverterOutputStream

Converter output stream implements gio.output_stream.OutputStream and allows conversion of data of various types during reading.

As of GLib 2.34, gio.converter_output_stream.ConverterOutputStream implements gio.pollable_output_stream.PollableOutputStream.

Constructors

this
this(gio.output_stream.OutputStream baseStream, gio.converter.Converter converter)

Creates a new converter output stream for the base_stream.

Members

Functions

getConverter
gio.converter.Converter getConverter()

Gets the #GConverter that is used by converter_stream.

Mixed In Members

From mixin PollableOutputStreamT!()

canPoll
bool canPoll()

Checks if stream is actually pollable. Some classes may implement #GPollableOutputStream but have only certain instances of that class be pollable. If this method returns false, then the behavior of other #GPollableOutputStream methods is undefined.

createSource
glib.source.Source createSource(gio.cancellable.Cancellable cancellable)

Creates a #GSource that triggers when stream can be written, or cancellable is triggered or an error occurs. The callback on the source is of the #GPollableSourceFunc type.

isWritable
bool isWritable()

Checks if stream can be written.

writeNonblocking
ptrdiff_t writeNonblocking(ubyte[] buffer, gio.cancellable.Cancellable cancellable)

Attempts to write up to count bytes from buffer to stream, as with gio.output_stream.OutputStream.write. If stream is not currently writable, this will immediately return gio.types.IOErrorEnum.WouldBlock, and you can use gio.pollable_output_stream.PollableOutputStream.createSource to create a #GSource that will be triggered when stream is writable.

writevNonblocking
gio.types.PollableReturn writevNonblocking(gio.types.OutputVector[] vectors, size_t bytesWritten, gio.cancellable.Cancellable cancellable)

Attempts to write the bytes contained in the n_vectors vectors to stream, as with gio.output_stream.OutputStream.writev. If stream is not currently writable, this will immediately return %G_POLLABLE_RETURN_WOULD_BLOCK, and you can use gio.pollable_output_stream.PollableOutputStream.createSource to create a #GSource that will be triggered when stream is writable. error will *not* be set in that case.

Inherited Members

From FilterOutputStream

getBaseStream
gio.output_stream.OutputStream getBaseStream()

Gets the base stream for the filter stream.

getCloseBaseStream
bool getCloseBaseStream()

Returns whether the base stream will be closed when stream is closed.

setCloseBaseStream
void setCloseBaseStream(bool closeBase)

Sets whether the base stream will be closed when stream is closed.

From PollableOutputStream

canPoll
bool canPoll()

Checks if stream is actually pollable. Some classes may implement #GPollableOutputStream but have only certain instances of that class be pollable. If this method returns false, then the behavior of other #GPollableOutputStream methods is undefined.

createSource
glib.source.Source createSource(gio.cancellable.Cancellable cancellable)

Creates a #GSource that triggers when stream can be written, or cancellable is triggered or an error occurs. The callback on the source is of the #GPollableSourceFunc type.

isWritable
bool isWritable()

Checks if stream can be written.

writeNonblocking
ptrdiff_t writeNonblocking(ubyte[] buffer, gio.cancellable.Cancellable cancellable)

Attempts to write up to count bytes from buffer to stream, as with gio.output_stream.OutputStream.write. If stream is not currently writable, this will immediately return gio.types.IOErrorEnum.WouldBlock, and you can use gio.pollable_output_stream.PollableOutputStream.createSource to create a #GSource that will be triggered when stream is writable.

writevNonblocking
gio.types.PollableReturn writevNonblocking(gio.types.OutputVector[] vectors, size_t bytesWritten, gio.cancellable.Cancellable cancellable)

Attempts to write the bytes contained in the n_vectors vectors to stream, as with gio.output_stream.OutputStream.writev. If stream is not currently writable, this will immediately return %G_POLLABLE_RETURN_WOULD_BLOCK, and you can use gio.pollable_output_stream.PollableOutputStream.createSource to create a #GSource that will be triggered when stream is writable. error will *not* be set in that case.