gio.MemoryOutputStreamStreaming output operations on memory chunksSynopsisgio.MemoryOutputStreamgio.OutputStreamgio.MemoryOutputStreamget_contentsget_data_sizeget_sizeAncestry+-- gobject.GObject
+-- gio.OutputStream
+-- gio.MemoryOutputStream
Implemented Interfacesgio.MemoryOutputStream
implements
gio.SeekableDescriptiongio.MemoryOutputStream
is a class for using arbitrary memory chunks as output for GIO streaming output operations.
Constructorgio.MemoryOutputStreamReturns :a new
gio.MemoryOutputStream.
Creates a new
gio.MemoryOutputStream.
Methodsgio.MemoryOutputStream.get_contentsget_contentsReturns :the stream's data
The get_contents() method gets any loaded data
from the ostream.
Note that the returned data may become invalid on the next write or truncate
operation on the stream.
gio.MemoryOutputStream.get_data_sizeget_data_sizeReturns :the number of bytes written to the stream
The get_data_size() method returns the number
of bytes from the start up to including the last byte written in the
stream that has not been truncated away.
gio.MemoryOutputStream.get_sizeget_sizeReturns :the number of bytes allocated for the data buffer
The get_size() method gets the size of the
currently allocated data area (availible from
gio.MemoryOutputStream.get_contents()
).
Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
If you want the number of bytes currently written to the stream, use
gio.MemoryOutputStream.get_data_size().