:right-sidebar: True BufferedOutputStream =================================================================== .. currentmodule:: gi.repository.Gio .. class:: BufferedOutputStream(**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` Buffered output stream implements :obj:`~gi.repository.Gio.FilterOutputStream` and provides for buffered writes. By default, ``GBufferedOutputStream``\'s buffer size is set at 4 kilobytes. To create a buffered output stream, use :obj:`~gi.repository.Gio.BufferedOutputStream.new`\, or :obj:`~gi.repository.Gio.BufferedOutputStream.new_sized` to specify the buffer's size at construction. To get the size of a buffer within a buffered input stream, use :obj:`~gi.repository.Gio.BufferedOutputStream.get_buffer_size`\. To change the size of a buffered output stream's buffer, use :obj:`~gi.repository.Gio.BufferedOutputStream.set_buffer_size`\. Note that the buffer's size cannot be reduced below the size of the data within the buffer. Constructors ------------ .. rst-class:: interim-class .. class:: BufferedOutputStream :no-index: .. classmethod:: new(base_stream: ~gi.repository.Gio.OutputStream) -> ~gi.repository.Gio.OutputStream Creates a new buffered output stream for a base stream. :param base_stream: a :obj:`~gi.repository.Gio.OutputStream`\. .. classmethod:: new_sized(base_stream: ~gi.repository.Gio.OutputStream, size: int) -> ~gi.repository.Gio.OutputStream Creates a new buffered output stream with a given buffer size. :param base_stream: a :obj:`~gi.repository.Gio.OutputStream`\. :param size: a :obj:`~gi.repository.gsize`\. Methods ------- .. rst-class:: interim-class .. class:: BufferedOutputStream :no-index: .. method:: get_auto_grow() -> bool Checks if the buffer automatically grows as data is added. .. method:: get_buffer_size() -> int Gets the size of the buffer in the ``stream``\. .. method:: set_auto_grow(auto_grow: bool) -> None Sets whether or not the ``stream``\'s buffer should automatically grow. If ``auto_grow`` is true, then each write will just make the buffer larger, and you must manually flush the buffer to actually write out the data to the underlying stream. :param auto_grow: a :obj:`~gi.repository.gboolean`\. .. method:: set_buffer_size(size: int) -> None Sets the size of the internal buffer to ``size``\. :param size: a :obj:`~gi.repository.gsize`\. Properties ---------- .. rst-class:: interim-class .. class:: BufferedOutputStream :no-index: .. attribute:: props.auto_grow :type: bool The type of the None singleton. .. attribute:: props.buffer_size :type: int The type of the None singleton. Fields ------ .. rst-class:: interim-class .. class:: BufferedOutputStream :no-index: .. attribute:: parent_instance .. attribute:: priv