Gda.Binary¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
binary_length |
r/w |
length of data |
|
data |
r/w |
the actual data as an array |
Methods¶
class |
|
class |
|
|
Details¶
- class Gda.Binary¶
- classmethod copy(boxed)¶
- Parameters:
- Returns:
a newly allocated
Gda.Binary
which contains a copy of information in boxed.Free-function:
Gda.Binary.free
- Return type:
Creates a new
Gda.Binary
structure from an existing one.
- classmethod free(boxed)¶
- Parameters:
boxed (
object
orNone
) –Gda.Binary
to free.
Deallocates all memory associated to the given
Gda.Binary
.
- to_string(maxlen)¶
- Parameters:
maxlen (
int
) – a maximum len used to truncate, or %0 for no maximum length- Returns:
a new string from self
- Return type:
Converts all the non printable characters of bin->data into the “\xyz” representation where “xyz” is the octal representation of the byte, and the ‘\’ (backslash) character is converted to “\\”. Printable characters (defined by g_ascii_isprint()) as well as newline character are not converted.
Note that the backslash and newline characters are considered as printable characters and will not be represented by the “\xyz” representation.
Use this function to get a representation as much readable by humans as possible of a binary chunk. Note that this function is internally called when transforming a binary value to a string for example when using
GObject.Value.transform
() orGda.value_stringify
().