get_size


Description:

public size_t get_size ()

Gets the size of the currently allocated data area (available from get_data).

You probably don't want to use this function on resizable streams. See get_data_size instead. For resizable streams the size returned by this function is an implementation detail and may be change at any time in response to operations on the stream.

If the stream is fixed-sized (ie: no realloc was passed to MemoryOutputStream.from_data) then this is the maximum size of the stream and further writes will return g_io_error_no_space.

In any case, if you want the number of bytes currently written to the stream, use get_data_size.

Parameters:

this

a MemoryOutputStream

Returns:

the number of bytes allocated for the data buffer