Class: Gio::MemoryInputStream

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#add_bytes(bytes) ⇒ nil

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

Parameters:

  • bytes (GLib::Bytes)

    input data

Returns:

  • (nil)

#add_data(data, len, destroy) ⇒ nil

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

Parameters:

  • data (Array<Integer>)

    input data

  • len (Gio::gssize)

    length of the data, may be -1 if data is a nul-terminated string

  • destroy (GLib::DestroyNotify)

    function that is called to free data, or nil

Returns:

  • (nil)

#newGio::InputStream

Creates a new empty GMemory::InputStream.

Returns:

#new_from_bytes(bytes) ⇒ Gio::InputStream

Creates a new GMemory::InputStream with data from the given bytes.

Parameters:

  • bytes (GLib::Bytes)

    a #GBytes

Returns:

#new_from_data(data, len, destroy) ⇒ Gio::InputStream

Creates a new GMemory::InputStream with data in memory of a given size.

Parameters:

  • data (Array<Integer>)

    input data

  • len (Gio::gssize)

    length of the data, may be -1 if data is a nul-terminated string

  • destroy (GLib::DestroyNotify)

    function that is called to free data, or nil

Returns: