DataInputStream.readUint16

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

In order to get the correct byte order for this read operation, see gio.data_input_stream.DataInputStream.getByteOrder and gio.data_input_stream.DataInputStream.setByteOrder.

class DataInputStream
ushort
readUint16

Parameters

cancellable gio.cancellable.Cancellable

optional #GCancellable object, null to ignore.

Return Value

Type: ushort

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