A factory to create StreamAccess instances from various ressources.
More...
|
|
| StreamAccessFactory (global::System.IntPtr cPtr, bool cMemoryOwn) |
| |
|
void | Dispose () |
| |
|
|
virtual void | Dispose (bool disposing) |
| |
A factory to create StreamAccess instances from various ressources.
- Examples
- SerializeArray.cs.
◆ Allocate() [1/2]
Create a stream in local memory.
- Parameters
-
| size | memory size (in byte) to allocate for the stream. |
- Returns
- a MemoryStreamAccess with all capabilities (
read, write and seek)
◆ Allocate() [2/2]
| static StreamAccess IOLink.StreamAccessFactory.Allocate |
( |
uint |
size | ) |
|
|
inlinestatic |
Create a stream in local memory.
- Parameters
-
| size | memory size (in byte) to allocate for the stream. |
- Returns
- a MemoryStreamAccess with all capabilities (
read, write and seek)
◆ CopyInMemory()
Load a stream into local memory.
- Parameters
-
| streamAccess | stream with at least read capability to load in memory |
- Returns
- a MemoryStreamAccess with all capabilities (
read, write and seek)
- Exceptions
-
| InvalidArgument | if input streamAccess is null |
| Error | if the input streamAccess has no read or seek capability |
◆ FromRandomAccess()
Create a StreamAccess that will delegate to a RandomAccess.
- Parameters
-
| randomAccess | RandomAccess from which a StreamAccess is created |
- Returns
- a StreamAccess object which can provide
read, write and seek capability (see StreamAccessCapability)
- Exceptions
-
| InvalidArgument | if input randomAccess is null |
| Error | if the input randomAccess has nor read and write capability |
◆ OpenFile()
| static StreamAccess IOLink.StreamAccessFactory.OpenFile |
( |
string |
filePath | ) |
|
|
inlinestatic |
Create a stream that can read and write data from/to a file.
- Parameters
-
| filePath | path toward the file which it's tried to access for reading and writing |
- Returns
- a StreamAccess object which can provide
read, write and eventually seek capability (see StreamAccessCapability)
◆ OpenFileRead()
| static StreamAccess IOLink.StreamAccessFactory.OpenFileRead |
( |
string |
filePath | ) |
|
|
inlinestatic |
Create a stream that can read data from a file.
- Parameters
-
| filePath | path toward the file which it's tried to access for reading |
- Returns
- a StreamAccess object which can eventually provide
seek capability (see StreamAccessCapability)
- Examples
- SerializeArray.cs.
◆ OpenFileWrite()
| static StreamAccess IOLink.StreamAccessFactory.OpenFileWrite |
( |
string |
filePath | ) |
|
|
inlinestatic |
Create a stream that can write data to a file.
- Parameters
-
| filePath | path toward the file which it's tried to access for writing |
- Returns
- a StreamAccess object which can eventually provide
seek capability (see StreamAccessCapability)
- Examples
- SerializeArray.cs.
◆ OpenHTTPWrite()
Create a stream that can post data to an HTTP URI. HTTP server must support chunked transfer encoding.
- Parameters
-
| uri | The HTTP(S) URI to post to. |
| method | The HTTP request method. |
| headers | The HTTP request headers. |
- Returns
- a StreamAccess object which can eventually provide
seek capability (see StreamAccessCapability)
◆ OpenURIWrite()
Create a stream that can write data to an URI.
If the URI scheme is 'file': calls openFileWrite. If the URI scheme is 'http(s)': calls openHTTPWrite, using the POST method and no headers.
- Parameters
-
| uri | URI to open for writing |
- Returns
- a StreamAccess object which can eventually provide
seek capability (see StreamAccessCapability)
The documentation for this class was generated from the following file:
- Release/net/generated/StreamAccessFactory.cs