![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
GMemoryOutputStream; GOutputStream* g_memory_output_stream_new (GByteArray *data); void g_memory_output_stream_set_max_size (GMemoryOutputStream *ostream, guint max_size); GByteArray* g_memory_output_stream_get_data (GMemoryOutputStream *ostream); void g_memory_output_stream_set_free_on_close (GMemoryOutputStream *ostream, gboolean free_on_close);
"data" gpointer : Read / Write / Construct "free-array" gboolean : Read / Write "size-limit" guint : Read / Write
GOutputStream* g_memory_output_stream_new (GByteArray *data);
Creates a new GMemoryOutputStream. If data
is non-NULL
it will use
that for its internal storage otherwise it will create a new GByteArray.
In both cases the internal GByteArray can later be accessed through the
"data" property.
Note: The new stream will not take ownership of the supplied
data
so you have to free it yourself after use or explicitly
ask for it be freed on close by setting the "free-array"
property to $TRUE.
|
a GByteArray. |
Returns : |
A newly created GMemoryOutputStream object. |
void g_memory_output_stream_set_max_size (GMemoryOutputStream *ostream, guint max_size);
|
|
|
GByteArray* g_memory_output_stream_get_data (GMemoryOutputStream *ostream);
|
|
Returns : |
GByteArray of the stream's data. |
void g_memory_output_stream_set_free_on_close (GMemoryOutputStream *ostream, gboolean free_on_close);
|
|
|