manpagez: man pages & more
html files: pygobject
Home | html | info | man
): gio.BufferedOutputStream(base_stream)
def get_auto_grow()
def get_buffer_size()
def set_auto_grow(auto_grow)
def set_buffer_size(size)
    def gio.buffered_output_stream_new_sized(size)


+-- gobject.GObject
  +-- gio.OutputStream
    +-- gio.FilterOutputStream
      +-- gio.BufferedOutputStream

gio.BufferedOutputStream Properties

"auto-grow"Read - WriteWhether the buffer should automatically grow. Default value: False.
"buffer-size"Read - Write - ConstructThe size of the backend buffer. Allowed values: >= 1. Default value: 4096.


gio.BufferedOutputStream implements gio.FilterOutputStream and provides for buffered writes.

By default, gio.BufferedOutputStream's buffer size is set at 4 kilobytes.

To create a buffered output stream, use gio.BufferedOutputStream(), or gio.buffered_output_stream_new_sized() to specify the buffer's size at construction.

To get the size of a buffer within a buffered output stream, use gio.BufferedOutputStream.get_buffer_size(). To change the size of a buffered output stream's buffer, use gio.BufferedOutputStream.set_buffer_size(). Note that the buffer's size cannot be reduced below the size of the data within the buffer.



base_stream :

a gio.OutputStream.

Returns :

a new gio.OutputStream for the given base_stream.

Creates a new buffered output stream for a base stream.



    def get_auto_grow()

Returns :

True if the stream's buffer automatically grows, False otherwise.

The get_auto_grow() method checks if the buffer automatically grows as data is added.


    def get_buffer_size()

Returns :

the current buffer size.

The get_buffer_size() method gets the size of the buffer in the stream.


    def set_auto_grow(auto_grow)

auto_grow :

a boolean.

The set_auto_grow() method 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.


    def set_buffer_size(size)

size :

the new buffer size.

The set_buffer_size() method sets the size of the internal buffer to size.



    def buffered_output_stream_new_sized(size)

size :

the requested buffer size.

Returns :

A new gio.OutputStream with an internal buffer set to size..

The buffered_output_stream_new_sized() function creates a new gio.BufferedOutputStream from the given base_stream, with a buffer set to size.

© 2000-2024
Individual documents may contain additional copyright information.