DataOutputStream

class DataOutputStream(**properties: Any)

Superclasses: FilterOutputStream, OutputStream, Object

Implemented Interfaces: Seekable

Data output stream implements OutputStream and includes functions for writing data directly to an output stream.

Constructors

class DataOutputStream
classmethod new(base_stream: OutputStream) DataOutputStream

Creates a new data output stream for base_stream.

Parameters:

base_stream – a OutputStream.

Methods

class DataOutputStream
get_byte_order() DataStreamByteOrder

Gets the byte order for the stream.

put_byte(data: int, cancellable: Cancellable | None = None) bool

Puts a byte into the output stream.

Parameters:
  • data – a guint8.

  • cancellable – optional Cancellable object, None to ignore.

put_int16(data: int, cancellable: Cancellable | None = None) bool

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

Parameters:
  • data – a int.

  • cancellable – optional Cancellable object, None to ignore.

put_int32(data: int, cancellable: Cancellable | None = None) bool

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

Parameters:
  • data – a int.

  • cancellable – optional Cancellable object, None to ignore.

put_int64(data: int, cancellable: Cancellable | None = None) bool

Puts a signed 64-bit integer into the stream.

Parameters:
  • data – a int.

  • cancellable – optional Cancellable object, None to ignore.

put_string(str: str, cancellable: Cancellable | None = None) bool

Puts a string into the output stream.

Parameters:
  • str – a string.

  • cancellable – optional Cancellable object, None to ignore.

put_uint16(data: int, cancellable: Cancellable | None = None) bool

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

Parameters:
  • data – a guint16.

  • cancellable – optional Cancellable object, None to ignore.

put_uint32(data: int, cancellable: Cancellable | None = None) bool

Puts an unsigned 32-bit integer into the stream.

Parameters:
  • data – a guint32.

  • cancellable – optional Cancellable object, None to ignore.

put_uint64(data: int, cancellable: Cancellable | None = None) bool

Puts an unsigned 64-bit integer into the stream.

Parameters:
  • data – a guint64.

  • cancellable – optional Cancellable object, None to ignore.

set_byte_order(order: DataStreamByteOrder) None

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

Parameters:

order – a %GDataStreamByteOrder.

Properties

class DataOutputStream
props.byte_order: DataStreamByteOrder

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

Fields

class DataOutputStream
parent_instance
priv