Gio.MemoryInputStream¶
class — extends InputStream, PollableInputStream, Seekable
GMemoryInputStream is a class for using arbitrary
memory chunks as input for GIO streaming input operations.
As of GLib 2.34, GMemoryInputStream implements
PollableInputStream.
Constructors¶
new¶
Creates a new empty MemoryInputStream.
new_from_bytes¶
Creates a new MemoryInputStream with data from the given bytes.
Parameters:
bytes— aGLib.Bytes
new_from_data¶
@classmethod
def new_from_data(cls, data: list[int], destroy: GLib.DestroyNotify | None = ...) -> InputStream
Creates a new MemoryInputStream with data in memory of a given size.
Parameters:
data— input datadestroy— function that is called to freedata, orNone
Methods¶
add_bytes¶
Appends bytes to data that can be read from the input stream.
Parameters:
bytes— input data
add_data¶
Appends data to data that can be read from the input stream
Parameters:
data— input datadestroy— function that is called to freedata, orNone