Module gridftpClient :: Class Buffer
[hide private]
[frames] | no frames]

Class Buffer

source code

object --+
         |
        Buffer

A wrapping of the Globus API globus_byte_t.

Instance Methods [hide private]
instance
__init__(self, size)
Constructs an instance.
source code
None
__del__(self)
Destroy an instance.
source code
string
as_string(self, size)
Return the contents of a buffer as a Python string of length size.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, size)
(Constructor)

source code 

Constructs an instance. A wrapped pointer to the Globus C type that is created is stored as the ._buffer attribute to the instance.

Returns: instance
an instance of the class
Raises:
Overrides: object.__init__

__del__(self)
(Destructor)

source code 

Destroy an instance. The wrapped pointer to the Globus C type is used by globus_free() to free all the memory associated with the Globus C type.

Returns: None
None
Raises:

as_string(self, size)

source code 

Return the contents of a buffer as a Python string of length size.

Parameters:
  • size (integer) - the number of bytes to return
Returns: string
the contents of the buffer as a Python string
Raises: