Method

GioDataInputStreamread_uint16

Declaration

guint16
g_data_input_stream_read_uint16 (
  GDataInputStream* stream,
  GCancellable* cancellable,
  GError** error
)

Description

Reads an unsigned 16-bit/2-byte value from stream.

In order to get the correct byte order for this read operation, see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().

Parameters

cancellable GCancellable
 

Optional GCancellable object, NULL to ignore.

 The argument can be NULL.
 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: guint16
 

An unsigned 16-bit/2-byte value read from the stream or 0 if an error occurred.