Camel.StreamMem¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Camel.StreamMem(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Camel.StreamMem- Return type:
Create a new
Camel.StreamMemobject.
- classmethod new_with_buffer(buffer)¶
- Parameters:
buffer (
bytes) – a memory buffer to use as the stream data- Returns:
a new
Camel.StreamMem- Return type:
Create a new memory stream using buffer as the stream data.
Note: buffer will be copied into an internal
GLib.ByteArraystructure for use as the stream backing. This may have resource implications you may wish to consider.
- classmethod new_with_byte_array(buffer)¶
- Parameters:
buffer (
bytes) – aGLib.ByteArrayto use as the stream data- Returns:
a new
Camel.StreamMem- Return type:
Create a new
Camel.StreamMemusing buffer as the stream data.Note: The newly created
Camel.StreamMemwill destroy buffer when destroyed.
- set_buffer(buffer)¶
- Parameters:
buffer (
bytes) – a memory buffer
Set buffer to be the backing data to the existing
Camel.StreamMem, self.Note: buffer will be copied into an internal
GLib.ByteArraystructure and so may have resource implications to consider.
- set_byte_array(buffer)¶
- Parameters:
buffer (
bytes) – aGLib.ByteArray
Set buffer to be the backing data to the existing
Camel.StreamMem, self.Note: self will not take ownership of buffer and so will need to be freed separately from self.
- set_secure()¶
Mark the memory stream as secure. At the very least this means the data in the buffer will be cleared when the buffer is finalized. This only applies to buffers owned by the stream.