MemoryInputStream#
Superclasses: InputStream
, Object
Implemented Interfaces: 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#
- 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