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
MemoryOutputStreamGidBuilder builder() static nothrowGet builder for [gio.memory_output_stream.MemoryOutputStream] Returns: New builder objectvoid * data() @property nothrowGet `data` property. Returns: Pointer to buffer where data will be written.gulong dataSize() @property nothrowGet `dataSize` property. Returns: Size of data written to the buffer.gio.memory_output_stream.MemoryOutputStream newResizable() static nothrowCreates a new #GMemoryOutputStream, using [glib.global.realloc] and [glib.global.gfree] for memory allocation. Returns:size_t getDataSize() nothrowReturns 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() nothrowGets the size of the currently allocated data area (available from [gio.memory_output_stream.MemoryOutputStream.getData]).glib.bytes.Bytes stealAsBytes() nothrowReturns data from the ostream as a #GBytes. ostream must be closed before calling this function. Returns: the stream's datavoid * stealData() nothrowGets 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
Methods
T data(void * propval) nothrowSet `data` property. Params: propval = Pointer to buffer where data will be written. Returns: Builder instance for fluent chainingT size(gulong propval) nothrowSet `size` property. Params: propval = Current size of the data buffer. Returns: Builder instance for fluent chainingFluent builder for gio.memory_output_stream.MemoryOutputStream
Methods