OutputStream.writeAll

Tries to write count bytes from buffer into the stream. Will block during the operation. This function is similar to g_output_stream_write(), except it tries to write as many bytes as requested, only stopping on an error. On a successful write of count bytes, TRUE is returned, and bytes_written is set to count. If there is an error during the operation FALSE is returned and error is set to indicate the error status, bytes_written is updated to contain the number of bytes written into the stream before the error occurred.

class OutputStream
int
writeAll

Parameters

buffer void*

the buffer containing the data to write. [array length=count][element-type guint8]

count gsize

the number of bytes to write

bytesWritten gsize*

location to store the number of bytes that was written to the stream. out

cancellable Cancellable

optional GCancellable object, NULL to ignore. [allow-none]

Return Value

Type: int

TRUE on success, FALSE if there was an error

Throws

GException on failure.

Meta