Gio.MemoryInputStream

g GObject.GInterface GObject.GInterface Gio.PollableInputStream Gio.PollableInputStream GObject.GInterface->Gio.PollableInputStream Gio.Seekable Gio.Seekable GObject.GInterface->Gio.Seekable GObject.Object GObject.Object Gio.InputStream Gio.InputStream GObject.Object->Gio.InputStream Gio.MemoryInputStream Gio.MemoryInputStream Gio.InputStream->Gio.MemoryInputStream Gio.PollableInputStream->Gio.MemoryInputStream Gio.Seekable->Gio.MemoryInputStream

Subclasses:None

Methods

Inherited:Gio.InputStream (19), GObject.Object (37), Gio.PollableInputStream (4), Gio.Seekable (5)
Structs:GObject.ObjectClass (5)
class new ()
class new_from_bytes (bytes)
class new_from_data (data, destroy)
  add_bytes (bytes)
  add_data (data, destroy)

Properties

None

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent_instance Gio.InputStream r  

Class Details

class Gio.MemoryInputStream(**kwargs)
Bases:Gio.InputStream, Gio.PollableInputStream, Gio.Seekable
Abstract:No
Structure:Gio.MemoryInputStreamClass

Gio.MemoryInputStream is a class for using arbitrary memory chunks as input for GIO streaming input operations.

As of GLib 2.34, Gio.MemoryInputStream implements Gio.PollableInputStream.

classmethod new()[source]
Returns:a new Gio.InputStream
Return type:Gio.InputStream

Creates a new empty Gio.MemoryInputStream.

classmethod new_from_bytes(bytes)[source]
Parameters:bytes (GLib.Bytes) – a GLib.Bytes
Returns:new Gio.InputStream read from bytes
Return type:Gio.InputStream

Creates a new Gio.MemoryInputStream with data from the given bytes.

New in version 2.34.

classmethod new_from_data(data, destroy)[source]
Parameters:
Returns:

new Gio.InputStream read from data of len bytes.

Return type:

Gio.InputStream

Creates a new Gio.MemoryInputStream with data in memory of a given size.

add_bytes(bytes)[source]
Parameters:bytes (GLib.Bytes) – input data

Appends bytes to data that can be read from the input stream.

New in version 2.34.

add_data(data, destroy)[source]
Parameters:

Appends data to data that can be read from the input stream