GMime.StreamMem¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
buffer |
r |
a memory buffer |
|
owner |
r |
|
|
parent_object |
r |
parent |
Class Details¶
- class GMime.StreamMem(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A memory-backed
GMime.Stream.- classmethod new()¶
- Returns:
a new memory stream.
- Return type:
Creates a new
GMime.StreamMemobject.
- classmethod new_with_buffer(buffer)¶
- Parameters:
buffer (
bytes) – stream data- Returns:
a new memory stream initialized with buffer.
- Return type:
Creates a new
GMime.StreamMemobject and initializes the stream contents with the first len bytes of buffer.
- classmethod new_with_byte_array(array)¶
- Parameters:
array (
bytes) – source data- Returns:
a new memory stream using array.
- Return type:
Creates a new
GMime.StreamMemwith data array.
- get_byte_array()¶
- Returns:
the byte array from the memory stream.
- Return type:
Gets the byte array from the memory stream.
- get_owner()¶
-
Gets whether or not self owns the backend memory buffer.
- set_byte_array(array)¶
- Parameters:
array (
bytes) – stream data
Sets the byte array on the memory stream.
Note: The memory stream is not responsible for freeing the byte array. Use
GMime.StreamMem.set_owner() to change this behavior.