cohtml.StreamReader

Class responsible for reading resource stream requests.

Inherits from cohtml.Net.UnitySyncStreamReader, cohtml.Net.ISyncStreamReader, cohtml.Net.IStreamReader, SystemIDisposable

Public Functions

Name
StreamReader(string path)
Creates a StreamReader and a FileStream object with the given path.
StreamReader(byte [] bytes)
Creates a StreamReader and stores the provided bytes array of a file.
virtual override voidClose()
Closes the FileStream and disposes the StreamReader.
virtual override uintGetSize()
Returns the size of the FileStream or the provided bytes array of a file.
override uintRead(uint offset, IntPtr buffer, uint count)
Reads an amount of bytes from the stream and writes the data in a given buffer.

Additional inherited members

Public Functions inherited from cohtml.Net.UnitySyncStreamReader

Name
virtual override voidDispose()
UnitySyncStreamReader()
delegate uintSwigDelegateUnitySyncStreamReader_0(global.System.IntPtr swigId)
delegate uintSwigDelegateUnitySyncStreamReader_1(uint offset, global.System.IntPtr buffer, uint count, global.System.IntPtr swigId)
delegate voidSwigDelegateUnitySyncStreamReader_2(global.System.IntPtr swigId)

Public Functions inherited from cohtml.Net.ISyncStreamReader

Name
virtual override voidDispose()

Public Functions inherited from cohtml.Net.IStreamReader

Name
virtual voidDispose()

Protected Attributes inherited from cohtml.Net.IStreamReader

Name
boolswigCMemOwn

Public Functions Documentation

function StreamReader

StreamReader(
    string path
)

Creates a StreamReader and a FileStream object with the given path.

function StreamReader

StreamReader(
    byte [] bytes
)

Creates a StreamReader and stores the provided bytes array of a file.

function Close

virtual override void Close()

Closes the FileStream and disposes the StreamReader.

Reimplements: cohtml.Net.UnitySyncStreamReader.Close

function GetSize

virtual override uint GetSize()

Returns the size of the FileStream or the provided bytes array of a file.

Reimplements: cohtml.Net.UnitySyncStreamReader.GetSize

function Read

override uint Read(
    uint offset,
    IntPtr buffer,
    uint count
)

Reads an amount of bytes from the stream and writes the data in a given buffer.

Parameters:

  • offset Offset of the data.
  • buffer A buffer to copy data to.
  • count The amount of bytes to read.