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.StreamMem
object.
- 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.ByteArray
structure 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.ByteArray
to use as the stream data- Returns:
a new
Camel.StreamMem
- Return type:
Create a new
Camel.StreamMem
using buffer as the stream data.Note: The newly created
Camel.StreamMem
will 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.ByteArray
structure 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.