gio.memory_output_stream
Module for MemoryOutputStream class
Types 3
classMemoryOutputStream : gio.output_stream.OutputStream, gio.pollable_output_stream.PollableOutputStream, gio.seekable.Seekable
gio.memory_output_stream.MemoryOutputStream is a class for using arbitrary memory chunks as output for GIO streaming output operations.
As of GLib 2.34, gio.memory_output_stream.MemoryOutputStream trivially implements
Methods
MemoryOutputStream self()Returns `this`, for use in `with` statements.MemoryOutputStreamGidBuilder builder()Get builder for [gio.memory_output_stream.MemoryOutputStream] Returns: New builder objectgio.memory_output_stream.MemoryOutputStream newResizable()Creates a new #GMemoryOutputStream, using [glib.global.realloc] and [glib.global.gfree] for memory allocation. Returns:void * getData()Gets any loaded data from the ostream.size_t getDataSize()Returns the number of bytes from the start up to including the last byte written in the stream that has not been truncated away. Returns: the number of bytes written to the streamsize_t getSize()Gets the size of the currently allocated data area (available from [gio.memory_output_stream.MemoryOutputStream.getData]).glib.bytes.Bytes stealAsBytes()Returns data from the ostream as a #GBytes. ostream must be closed before calling this function. Returns: the stream's datavoid * stealData()Gets any loaded data from the ostream. Ownership of the data is transferred to the caller; when no longer needed it must be freed using the free function set in ostream's #GMemoryOutputStream:destr...classMemoryOutputStreamGidBuilderImpl(T) : gio.output_stream.OutputStreamGidBuilderImpl!T, gio.pollable_output_stream.PollableOutputStreamGidBuilderImpl!T, gio.seekable.SeekableGidBuilderImpl!T
Fluent builder implementation template for gio.memory_output_stream.MemoryOutputStream
Fluent builder for gio.memory_output_stream.MemoryOutputStream
Methods
MemoryOutputStream build()Create object from builder. Returns: New object