Gio.DataOutputStream

g GObject.GInterface GObject.GInterface Gio.Seekable Gio.Seekable GObject.GInterface->Gio.Seekable GObject.Object GObject.Object Gio.OutputStream Gio.OutputStream GObject.Object->Gio.OutputStream Gio.DataOutputStream Gio.DataOutputStream Gio.FilterOutputStream Gio.FilterOutputStream Gio.FilterOutputStream->Gio.DataOutputStream Gio.OutputStream->Gio.FilterOutputStream Gio.Seekable->Gio.DataOutputStream

Subclasses:

None

Methods

Inherited:

Gio.FilterOutputStream (3), Gio.OutputStream (29), GObject.Object (37), Gio.Seekable (5)

Structs:

GObject.ObjectClass (5)

class

new (base_stream)

get_byte_order ()

put_byte (data, cancellable)

put_int16 (data, cancellable)

put_int32 (data, cancellable)

put_int64 (data, cancellable)

put_string (str, cancellable)

put_uint16 (data, cancellable)

put_uint32 (data, cancellable)

put_uint64 (data, cancellable)

set_byte_order (order)

Virtual Methods

Inherited:

Gio.OutputStream (15), GObject.Object (7), Gio.Seekable (5)

Properties

Inherited:

Gio.FilterOutputStream (2)

Name

Type

Flags

Short Description

byte-order

Gio.DataStreamByteOrder

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gio.FilterOutputStream

r

Class Details

class Gio.DataOutputStream(**kwargs)
Bases:

Gio.FilterOutputStream, Gio.Seekable

Abstract:

No

Structure:

Gio.DataOutputStreamClass

Data output stream implements [class`Gio`.OutputStream] and includes functions for writing data directly to an output stream.

classmethod new(base_stream)[source]
Parameters:

base_stream (Gio.OutputStream) – a Gio.OutputStream.

Returns:

Gio.DataOutputStream.

Return type:

Gio.DataOutputStream

Creates a new data output stream for base_stream.

get_byte_order()[source]
Returns:

the Gio.DataStreamByteOrder for the self.

Return type:

Gio.DataStreamByteOrder

Gets the byte order for the stream.

put_byte(data, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if data was successfully added to the self.

Return type:

bool

Puts a byte into the output stream.

put_int16(data, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if data was successfully added to the self.

Return type:

bool

Puts a signed 16-bit integer into the output stream.

put_int32(data, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if data was successfully added to the self.

Return type:

bool

Puts a signed 32-bit integer into the output stream.

put_int64(data, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if data was successfully added to the self.

Return type:

bool

Puts a signed 64-bit integer into the stream.

put_string(str, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if string was successfully added to the self.

Return type:

bool

Puts a string into the output stream.

put_uint16(data, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if data was successfully added to the self.

Return type:

bool

Puts an unsigned 16-bit integer into the output stream.

put_uint32(data, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if data was successfully added to the self.

Return type:

bool

Puts an unsigned 32-bit integer into the stream.

put_uint64(data, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

True if data was successfully added to the self.

Return type:

bool

Puts an unsigned 64-bit integer into the stream.

set_byte_order(order)[source]
Parameters:

order (Gio.DataStreamByteOrder) – a Gio.DataStreamByteOrder.

Sets the byte order of the data output stream to order.

Property Details

Gio.DataOutputStream.props.byte_order
Name:

byte-order

Type:

Gio.DataStreamByteOrder

Default Value:

Gio.DataStreamByteOrder.BIG_ENDIAN

Flags:

READABLE, WRITABLE

Determines the byte ordering that is used when writing multi-byte entities (such as integers) to the stream.