| IOLink C# 1.11.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
IOLink.NetStreamAccess Class Reference
Inheritance diagram for IOLink.NetStreamAccess:

## Public Member Functions
| NetStreamAccess (System.IO.Stream stream)
override bool | GetGood ()
| Checks if the stream is currently valid for reading (only) Default implementation returns true if nor 'end of file' or 'fail' status are raised.
override bool | GetEof ()
| Checks if the cursor is at the end of the stream for reading For writing, this status is not relevant.
override string | GetResourceId ()
| Return the resource identifier of this data accessor.
override DataStorage | GetStorage ()
| Get the storage to which this data accessor belong.
override StreamAccessCapabilitySet | GetCapabilities ()
| Returns capabilities for current stream
override uint | Read (uint size, byte[] dst)
| Read data from cursor current position into destination buffer. Cursor position is incremented by the actually read bytes count.
override uint | Write (uint size, byte[] src)
| Write content of src buffer into StreamAccess. Stream cursor is incremented by actually written bytes count.
override void | Flush ()
| Assure that all data is written to the endpoint.
override byte | Peek ()
| Return the current byte without moving the cursor.
override uint | Tell ()
| Returns the current position of the cursor.
override void | Seek (long offset, SeekOrigin origin)
| Move the cursor to the desired position.
Public Member Functions inherited from IOLink.StreamAccess
| StreamAccess (global::System.IntPtr cPtr, bool cMemoryOwn)
bool | Support (StreamAccessCapabilitySet flags)
| Checks if the StreamAccess supports the given capabilities.
virtual bool | GetFail ()
string | ToString ()
| Return a string representation.
delegate global::System.IntPtr | SwigDelegateStreamAccess_0 ()
delegate string | SwigDelegateStreamAccess_1 ()
delegate global::System.IntPtr | SwigDelegateStreamAccess_2 ()
delegate bool | SwigDelegateStreamAccess_3 ()
delegate bool | SwigDelegateStreamAccess_4 ()
delegate bool | SwigDelegateStreamAccess_5 ()
delegate uint | SwigDelegateStreamAccess_6 (uint size, global::System.IntPtr dst)
delegate byte | SwigDelegateStreamAccess_7 ()
delegate uint | SwigDelegateStreamAccess_8 (uint size, global::System.IntPtr src)
delegate void | SwigDelegateStreamAccess_9 ()
delegate uint | SwigDelegateStreamAccess_10 ()
delegate void | SwigDelegateStreamAccess_11 (long offset, int origin)
Public Member Functions inherited from IOLink.DataAccess
| DataAccess (global::System.IntPtr cPtr, bool cMemoryOwn)
void | Dispose ()

## Additional Inherited Members
Static Public Member Functions inherited from IOLink.StreamAccess
static global::System.Runtime.InteropServices.HandleRef | getCPtr (StreamAccess obj)
Static Public Member Functions inherited from IOLink.DataAccess
static global::System.Runtime.InteropServices.HandleRef | getCPtr (DataAccess obj)
Protected Member Functions inherited from IOLink.StreamAccess
override void | Dispose (bool disposing)
Properties inherited from IOLink.StreamAccess
StreamAccessCapabilitySet | Capabilities`[get]`
| The Capabilities on the `StreamAccess`
bool | IsGood`[get]`
| Checks if the stream is in a good state.
bool | IsEof`[get]`
| Checks if the stream at the end of file.
bool | IsFail`[get]`
| Checks if the stream is in a fail state.
Properties inherited from IOLink.DataAccess
DataStorage | Storage`[get]`
| The `Storage` associated with this `DataAccess`
string | ResourceId`[get]`
| The identifier of this `DataAccess` in its `DataStorage`

## Member Function Documentation

## ◆ Flush()

override void IOLink.NetStreamAccess.Flush | ( |  | ) |
| inline virtual

Assure that all data is written to the endpoint.

Available when the StreamAccess has the WRITE capability.

Reimplemented from IOLink.StreamAccess.

## ◆ GetCapabilities()

override StreamAccessCapabilitySet IOLink.NetStreamAccess.GetCapabilities | ( |  | ) |
| inline virtual

Returns
  capabilities for current stream

Reimplemented from IOLink.StreamAccess.

## ◆ GetEof()

override bool IOLink.NetStreamAccess.GetEof | ( |  | ) |
| inline virtual

Checks if the cursor is at the end of the stream for reading For writing, this status is not relevant.

Returns
  true if the end of stream is reached. No more byte can be read.

Reimplemented from IOLink.StreamAccess.

## ◆ GetGood()

override bool IOLink.NetStreamAccess.GetGood | ( |  | ) |
| inline virtual

Checks if the stream is currently valid for reading (only) Default implementation returns true if nor 'end of file' or 'fail' status are raised.

Returns
  true if the stream can be read

Reimplemented from IOLink.StreamAccess.

## ◆ GetResourceId()

override string IOLink.NetStreamAccess.GetResourceId | ( |  | ) |
| inline virtual

Return the resource identifier of this data accessor.

Reimplemented from IOLink.DataAccess.

## ◆ GetStorage()

override DataStorage IOLink.NetStreamAccess.GetStorage | ( |  | ) |
| inline virtual

Get the storage to which this data accessor belong.

Reimplemented from IOLink.DataAccess.

## ◆ Peek()

override byte IOLink.NetStreamAccess.Peek | ( |  | ) |
| inline virtual

Return the current byte without moving the cursor.

Available when the StreamAccess has the READ capability.

Exceptions

  Error | if cursor is at EOF.

Reimplemented from IOLink.StreamAccess.

## ◆ Read()

override uint IOLink.NetStreamAccess.Read | ( | uint | size,
|  | byte[] | dst
| ) |  |
| inline virtual

Read data from cursor current position into destination buffer. Cursor position is incremented by the actually read bytes count.

Available when the StreamAccess has the READ capability.

Parameters

  size | Size in byte of the area to read
  dst | Destination buffer. This buffer should have a size of "size"

Returns
  Count of actually read bytes.

Reimplemented from IOLink.StreamAccess.

## ◆ Seek()

override void IOLink.NetStreamAccess.Seek | ( | long | offset,
|  | SeekOrigin | origin
| ) |  |
| inline virtual

Move the cursor to the desired position.

Available when the StreamAccess has the SEEK capability.

Cursor position must be set as following: new position = current position + offset If new computed position is less than 0, previous current position is kept.

Parameters

  offset | Offset used to move the cursor according to the origin.
  origin | The origin from which to move the cursor. Can be the start of the stream, the current position of the cursor, or the end of the stream. Positive offsets always make the cursor move forward in the stream, whatever the origin. Negative offsets always make the cursor move backward.

Exceptions

  Error | if trying to set cursor before BEGIN position (negative value)

Reimplemented from IOLink.StreamAccess.

## ◆ Tell()

override uint IOLink.NetStreamAccess.Tell | ( |  | ) |
| inline virtual

Returns the current position of the cursor.

Available when the StreamAccess has the SEEK capability.

Reimplemented from IOLink.StreamAccess.

## ◆ Write()

override uint IOLink.NetStreamAccess.Write | ( | uint | size,
|  | byte[] | src
| ) |  |
| inline virtual

Write content of src buffer into StreamAccess. Stream cursor is incremented by actually written bytes count.

Available when the StreamAccess has the WRITE capability.

Parameters

  size | Size in byte of given buffer to write
  src | Source buffer. This buffer should have a size of "size"

Returns
  Count of actually written bytes. It may not be considered as an error that return value if different than size (ie. an exception may not be thrown). It is up to user to decide what to do in this case.

Reimplemented from IOLink.StreamAccess.

The documentation for this class was generated from the following file:

- wrapping/net/library/NetStreamAccess_custom.cs