|
|
| __init__ (self, *args, **kwargs) |
| |
|
|
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") |
| |
A factory to create RandomAccess instances from various ressources.
◆ allocate()
| iolink.iolink.RandomAccessFactory.allocate |
( |
|
size | ) |
|
|
static |
Create an in-memory RandomAccess of given size.
◆ copy_in_memory()
| iolink.iolink.RandomAccessFactory.copy_in_memory |
( |
|
randomAccess | ) |
|
|
static |
Load given RandomAccess in memory.
If storage is already an in-memory RandomAccess, return it (no copy are done).
:raises: InvalidArgument if input randomAccess is null
◆ extract_region()
| iolink.iolink.RandomAccessFactory.extract_region |
( |
* |
args | ) |
|
|
static |
*Overload 1:*
Creates an accessor to a subset of a RandomAccess.
:type src: :py:class:`RandomAccess`
:param src: The accessor to create the subset from
:type offset: int
:param offset: The offset from the start of the source accessor
:raises: InvalidArgument if input randomAccess is null
:raises: Error When offset is out of range.
|
*Overload 2:*
Creates an accessor to a subset of a RandomAccess.
:type src: :py:class:`RandomAccess`
:param src: The accessor to create the subset from
:type offset: int
:param offset: The offset from the start of the source accessor
:type size: int
:param size: The size of the subset.
:raises: InvalidArgument if input randomAccess is null
:raises: Error When the subset range is out of the source accessor range.
◆ from_buffer()
| iolink.iolink.RandomAccessFactory.from_buffer |
( |
|
buffer | ) |
|
|
static |
Create a RandomAccess from given memory area.
The memory still remain user managed, and modyfing it can lead to
undefined behavior.
:param buffer The user memory buffer to use.
◆ from_stream()
| iolink.iolink.RandomAccessFactory.from_stream |
( |
|
stream | ) |
|
|
static |
Create a RandomAccess that will delegate to a StreamAccess.
:raises: InvalidArgument if input stream is null
◆ map_file()
| iolink.iolink.RandomAccessFactory.map_file |
( |
|
filePath | ) |
|
|
static |
Get an accessor from a file mapped in memory.
:type filePath: string
:param filePath: The path to the file to map.
:rtype: :py:class:`RandomAccess`
:return: A RandomAccess with read and write capabilities.
:raises: Error If the file does not exist already
◆ open_http_read()
| iolink.iolink.RandomAccessFactory.open_http_read |
( |
|
uri, |
|
|
|
method, |
|
|
|
headers |
|
) |
| |
|
static |
Create a RandomAccess from given HTTP URI, opening URI in Read Only.
Requested HTTP server must support HTTP range requests.
:type uri: :py:class:`Uri`
:param uri: The HTTP(S) URI to get.
:type method: string
:param method: The HTTP request method.
:type headers: :py:class:`HTTPHeaders`
:param headers: The HTTP request headers.
◆ open_uri_read()
| iolink.iolink.RandomAccessFactory.open_uri_read |
( |
|
uri | ) |
|
|
static |
Create a RandomAccess from given URI, opening URI in Read Only.
If the URI scheme is 'file': creates a ReadRandomAccess using StreamAccessFactory::openFileRead().
If the URI scheme is 'http(s)': calls openHTTPRead(), using the GET method and no headers.
The documentation for this class was generated from the following file:
- Release/python/iolink/iolink.py