"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.
Descriptiongio.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.
Constructorgio.BufferedOutputStreambase_streambase_stream :a
gio.OutputStream.
Returns :a new
gio.OutputStream
for the given base_stream.
Creates a new buffered output stream for a base stream.
Methodsgio.BufferedOutputStream.get_auto_growget_auto_growReturns :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.
gio.BufferedOutputStream.get_buffer_sizeget_buffer_sizeReturns :the current buffer size.
The get_buffer_size() method gets the size
of the buffer in the stream.
gio.BufferedOutputStream.set_auto_growset_auto_growauto_growauto_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.
gio.BufferedOutputStream.set_buffer_sizeset_buffer_sizesizesize :the new buffer size.
The set_buffer_size() method sets the size of
the internal buffer to size.
Functionsgio.buffered_output_stream_new_sizedbuffered_output_stream_new_sizedsizesize :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.