Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: MemoryInputStreamCtors

[126:14] static extends: object

Alternate constructors for MemoryInputStream. Usage: MemoryInputStreamCtors.<name>(...). The primary constructor lives directly on MemoryInputStream.

Methods

  • newFromBytes (object bytes)

    Creates a new #GMemoryInputStream with data from the given @bytes.

    • @p bytes is a #GBytes.
    • @r A new MemoryInputStream.

class: MemoryInputStream

[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].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • MemoryInputStream ()

    Creates a new empty #GMemoryInputStream.

  • 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asInputStream ()

    Wraps this handle as InputStream.

    • @r A InputStream object.
  • asPollableInputStream ()

    Wraps this handle as PollableInputStream.

    • @r A PollableInputStream object.
  • asSeekable ()

    Wraps this handle as Seekable.

    • @r A Seekable object.
  • add_bytes (object bytes)

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

    • @p bytes is input data.
    • @r None.