:right-sidebar: True DataOutputStream =================================================================== .. currentmodule:: gi.repository.Gio .. class:: DataOutputStream(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.FilterOutputStream`, :class:`~gi.repository.Gio.OutputStream`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.Seekable` Data output stream implements :obj:`~gi.repository.Gio.OutputStream` and includes functions for writing data directly to an output stream. Constructors ------------ .. rst-class:: interim-class .. class:: DataOutputStream :no-index: .. classmethod:: new(base_stream: ~gi.repository.Gio.OutputStream) -> ~gi.repository.Gio.DataOutputStream Creates a new data output stream for ``base_stream``\. :param base_stream: a :obj:`~gi.repository.Gio.OutputStream`\. Methods ------- .. rst-class:: interim-class .. class:: DataOutputStream :no-index: .. method:: get_byte_order() -> ~gi.repository.Gio.DataStreamByteOrder Gets the byte order for the stream. .. method:: put_byte(data: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts a byte into the output stream. :param data: a :obj:`~gi.repository.guint8`\. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: put_int16(data: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts a signed 16-bit integer into the output stream. :param data: a :obj:`int`. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: put_int32(data: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts a signed 32-bit integer into the output stream. :param data: a :obj:`int`. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: put_int64(data: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts a signed 64-bit integer into the stream. :param data: a :obj:`int`. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: put_string(str: str, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts a string into the output stream. :param str: a string. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: put_uint16(data: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts an unsigned 16-bit integer into the output stream. :param data: a :obj:`int`. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: put_uint32(data: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts an unsigned 32-bit integer into the stream. :param data: a :obj:`int`. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: put_uint64(data: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Puts an unsigned 64-bit integer into the stream. :param data: a :obj:`int`. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. .. method:: set_byte_order(order: ~gi.repository.Gio.DataStreamByteOrder) -> None Sets the byte order of the data output stream to ``order``\. :param order: a %GDataStreamByteOrder. Properties ---------- .. rst-class:: interim-class .. class:: DataOutputStream :no-index: .. attribute:: props.byte_order :type: ~gi.repository.Gio.DataStreamByteOrder The type of the None singleton. Fields ------ .. rst-class:: interim-class .. class:: DataOutputStream :no-index: .. attribute:: parent_instance .. attribute:: priv