Handle.readStreamSync

bool readStreamSync(gio.input_stream.InputStream stream, gio.cancellable.Cancellable cancellable = null)

Reads stream and writes the data from it to handle.

Before calling this function, you may need to call [rsvg.handle.Handle.setBaseUri] or [rsvg.handle.Handle.setBaseGfile] to set the "base file" for resolving references to external resources. SVG elements like <image> which reference external resources will be resolved relative to the location you specify with those functions.

If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error [gio.types.IOErrorEnum.Cancelled] will be returned.

Parameters

streama [gio.input_stream.InputStream]
cancellablea [gio.cancellable.Cancellable], or NULL

Returns

TRUE if reading stream succeeded, or FALSE otherwise

with error filled in

Throws

[ErrorWrap]