Camel.StreamMem

g Camel.Stream Camel.Stream Camel.StreamMem Camel.StreamMem Camel.Stream->Camel.StreamMem GObject.GInterface GObject.GInterface Gio.Seekable Gio.Seekable GObject.GInterface->Gio.Seekable GObject.Object GObject.Object GObject.Object->Camel.Stream Gio.Seekable->Camel.Stream

Subclasses:

None

Methods

Inherited:

Camel.Stream (10), GObject.Object (37), Gio.Seekable (5)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_with_buffer (buffer)

class

new_with_byte_array (buffer)

get_byte_array ()

set_buffer (buffer)

set_byte_array (buffer)

set_secure ()

Virtual Methods

Inherited:

Camel.Stream (5), GObject.Object (7), Gio.Seekable (5)

Properties

Inherited:

Camel.Stream (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Camel.Stream

r

Class Details

class Camel.StreamMem(**kwargs)
Bases:

Camel.Stream

Abstract:

No

Structure:

Camel.StreamMemClass

classmethod new()
Returns:

a new Camel.StreamMem

Return type:

Camel.Stream

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:

Camel.Stream

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) – a GLib.ByteArray to use as the stream data

Returns:

a new Camel.StreamMem

Return type:

Camel.Stream

Create a new Camel.StreamMem using buffer as the stream data.

Note: The newly created Camel.StreamMem will destroy buffer when destroyed.

get_byte_array()
Return type:

bytes

New in version 2.32.

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) – a GLib.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.