Skip to content
SiteEmail

cohtml.StreamReader

Class responsible for reading resource stream requests.

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

Name
StreamReader(string path)
Creates a StreamReader and a FileStream object with the given path.
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.
UnitySyncStreamReaderOpenStreamReader(string path)
Opens the file as StreamReader at the provided path if it exists.

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
StreamReader(
string path
)

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

virtual override void Close()

Closes the FileStream and disposes the StreamReader.

Reimplements: cohtml.Net.UnitySyncStreamReader.Close

virtual override uint GetSize()

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

Reimplements: cohtml.Net.UnitySyncStreamReader.GetSize

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.
static UnitySyncStreamReader OpenStreamReader(
string path
)

Opens the file as StreamReader at the provided path if it exists.

Parameters:

  • path The path to the file.

Return: A UnitySyncStreamReader object at the provided path.