MemoryInputStream
Superclasses: InputStream
, Object
Implemented Interfaces: PollableInputStream
, Seekable
- Constructors:
MemoryInputStream(**properties)
new() -> Gio.InputStream
new_from_bytes(bytes:GLib.Bytes) -> Gio.InputStream
new_from_data(data:list, destroy:GLib.DestroyNotify=None) -> Gio.InputStream
Constructors
- class MemoryInputStream
- classmethod new() InputStream
Creates a new empty
MemoryInputStream
.
- classmethod new_from_bytes(bytes: Bytes) InputStream
Creates a new
MemoryInputStream
with data from the givenbytes
.Added in version 2.34.
- Parameters:
bytes – a
Bytes
- classmethod new_from_data(data: Sequence[int], destroy: Callable[[None], None] | None = None) InputStream
Creates a new
MemoryInputStream
with data in memory of a given size.- Parameters:
data – input data
destroy – function that is called to free
data
, orNone