Basics
Guides
API Reference
Basics
Guides
API Reference
[14:7] extends: object
GMemoryInputStream is a class for using arbitrary memory chunks as input
for GIO streaming input operations. As of GLib 2.34, GMemoryInputStream
implements [iface@Gio.PollableInputStream].
GMemoryInputStream (Handle = null)
Creates a new empty #GMemoryInputStream.
Handle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asInputStream ()
Wraps this handle as
GInputStream.
A GInputStream object.asPollableInputStream ()
Wraps this handle as
GPollableInputStream.
A GPollableInputStream object.asSeekable ()
Wraps this handle as
GSeekable.
A GSeekable object.add_bytes (object bytes)
Appends @bytes to data that can be read from the input stream.
bytes is input data.None.add_data (list data, object destroy)
Appends @data to data that can be read from the input stream
data is input data.len is length of the data, may be -1 if @data is a nul-terminated string.destroy is function that is called to free @data, or %NULL.None.[149:14] static extends: object
Alternate constructors for GMemoryInputStream. Usage:
GMemoryInputStreamCtors.<name>(...). The primary constructor lives
directly on GMemoryInputStream.
newFromBytes (object bytes)
Creates a new #GMemoryInputStream with data from the given @bytes.
bytes is a #GBytes.A new GMemoryInputStream.newFromData (list data, object destroy)
Creates a new #GMemoryInputStream with data in memory of a given size.
data is input data.len is length of the data, may be -1 if @data is a nul-terminated string.destroy is function that is called to free @data, or %NULL.A new GMemoryInputStream.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.