Gio.BufferedOutputStream - Classes - Gio 2.0 (original) (raw)
g GObject.GInterface GObject.GInterface Gio.Seekable Gio.Seekable GObject.GInterface->Gio.Seekable GObject.Object GObject.Object Gio.OutputStream Gio.OutputStream GObject.Object->Gio.OutputStream Gio.BufferedOutputStream Gio.BufferedOutputStream Gio.FilterOutputStream Gio.FilterOutputStream Gio.FilterOutputStream->Gio.BufferedOutputStream Gio.OutputStream->Gio.FilterOutputStream Gio.Seekable->Gio.BufferedOutputStream
Subclasses:
None
Methods¶
Inherited:
Gio.FilterOutputStream (3), Gio.OutputStream (29), GObject.Object (37), Gio.Seekable (5)
Structs:
class | new (base_stream) |
---|---|
class | new_sized (base_stream, size) |
get_auto_grow () | |
get_buffer_size () | |
set_auto_grow (auto_grow) | |
set_buffer_size (size) |
Virtual Methods¶
Inherited:
Gio.OutputStream (15), GObject.Object (7), Gio.Seekable (5)
Properties¶
Inherited:
Name | Type | Flags | Short Description |
---|---|---|---|
auto-grow | bool | r/w | |
buffer-size | int | r/w/c |
Signals¶
Inherited:
Fields¶
Inherited:
Name | Type | Access | Description |
---|---|---|---|
parent_instance | Gio.FilterOutputStream | r |
Class Details¶
class Gio.BufferedOutputStream(**kwargs)¶
Bases:
Gio.FilterOutputStream, Gio.Seekable
Abstract:
No
Structure:
Buffered output stream implements [class`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 [ctor`Gio`.BufferedOutputStream.new], or [ctor`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 [method`Gio`.BufferedOutputStream.get_buffer_size]. To change the size of a buffered output stream’s buffer, use [method`Gio`.BufferedOutputStream.set_buffer_size]. Note that the buffer’s size cannot be reduced below the size of the data within the buffer.
classmethod new(base_stream)[source]¶
Parameters:
base_stream (Gio.OutputStream) – a [class`Gio`.OutputStream].
Returns:
a [class`Gio`.OutputStream] for the given base_stream.
Return type:
Creates a new buffered output stream for a base stream.
classmethod new_sized(base_stream, size)[source]¶
Parameters:
- base_stream (Gio.OutputStream) – a [class`Gio`.OutputStream].
- size (int) – a #gsize.
Returns:
a [class`Gio`.OutputStream] with an internal buffer set to size.
Return type:
Creates a new buffered output stream with a given buffer size.
Returns:
TRUE
if the self's buffer automatically grows,FALSE
otherwise.
Return type:
Checks if the buffer automatically grows as data is added.
Returns:
the current size of the buffer.
Return type:
Gets the size of the buffer in the self.
set_auto_grow(auto_grow)[source]¶
Parameters:
Sets whether or not the self'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.
set_buffer_size(size)[source]¶
Parameters:
size (int) – a #gsize.
Sets the size of the internal buffer to size.
Property Details¶
Gio.BufferedOutputStream.props.auto_grow¶
Name:
auto-grow
Type:
Default Value:
Flags:
Whether the buffer should automatically grow.
Gio.BufferedOutputStream.props.buffer_size¶
Name:
buffer-size
Type:
Default Value:
4096
Flags:
The size of the backend buffer, in bytes.