Class: Gio::MemoryInputStream

Inherits:
InputStream show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from InputStream

#clear_pending, #close, #close_async, #close_finish, #has_pending, #is_closed, open, #read, #read_all, #read_all_async, #read_all_finish, #read_all_raw, #read_async, #read_bytes, #read_bytes_async, #read_bytes_finish, #read_finish, #read_raw, #set_pending, #skip, #skip_async, #skip_finish

Constructor Details

#initialize(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

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)