Gio.BufferedOutputStream¶
| Subclasses: | None |
|---|
Methods¶
| Inherited: | Gio.FilterOutputStream (3), Gio.OutputStream (29), GObject.Object (37), Gio.Seekable (5) |
|---|---|
| Structs: | GObject.ObjectClass (5) |
| 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: | Gio.FilterOutputStream (2) |
|---|
| Name | Type | Flags | Short Description |
|---|---|---|---|
auto-grow |
bool |
r/w | Whether the buffer should automatically grow |
buffer-size |
int |
r/w/c | The size of the backend buffer |
Signals¶
| Inherited: | GObject.Object (1) |
|---|
Fields¶
| Inherited: | GObject.Object (1) |
|---|
| Name | Type | Access | Description |
|---|---|---|---|
| parent_instance | Gio.FilterOutputStream |
r |
Class Details¶
-
class
Gio.BufferedOutputStream(**kwargs)¶ Bases: Gio.FilterOutputStream,Gio.SeekableAbstract: No Structure: Gio.BufferedOutputStreamClassBuffered output stream implements
Gio.FilterOutputStreamand 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.new(), orGio.BufferedOutputStream.new_sized() to specify the buffer’s size at construction.To get the size of a buffer within a buffered input stream, use
Gio.BufferedOutputStream.get_buffer_size(). To change the size of a buffered output stream’s buffer, useGio.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) – aGio.OutputStream.Returns: a Gio.OutputStreamfor the given base_stream.Return type: Gio.OutputStreamCreates a new buffered output stream for a base stream.
-
classmethod
new_sized(base_stream, size)[source]¶ Parameters: - base_stream (
Gio.OutputStream) – aGio.OutputStream. - size (
int) – a #gsize.
Returns: a
Gio.OutputStreamwith an internal buffer set to size.Return type: Creates a new buffered output stream with a given buffer size.
- base_stream (
-
get_auto_grow()[source]¶ Returns: Trueif the self’s buffer automatically grows,Falseotherwise.Return type: boolChecks if the buffer automatically grows as data is added.
-
get_buffer_size()[source]¶ Returns: the current size of the buffer. Return type: intGets the size of the buffer in the self.
-
set_auto_grow(auto_grow)[source]¶ Parameters: auto_grow ( bool) – abool.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.
-
classmethod