-
Notifications
You must be signed in to change notification settings - Fork 3
Utils.StreamExtensions
Back to home | Back to Reference | View raw text
Extension methods for Streams. This file is not utilized in SolidShineUi at all, and will be removed in a future version.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi.Utils
SolidShineUi.Utils.StreamExtensions[[StreamExtensions]]
end
Returns | Name |
---|---|
string |
ReadAsciiString (Stream stream, int length)Reads a ASCII string of the specified length. |
string |
ReadStringBigEndian (... )Reads a unicode string of the specified length in big-endian format. |
int |
ReadUInt16BigEndian (Stream stream)Reads a 2-byte unsigned integer from the current stream using big-endian encoding and advances the position of the stream by two bytes. |
int |
ReadUInt32BigEndian (Stream stream)Reads a 4-byte unsigned integer from the current stream using big-endian encoding and advances the position of the stream by four bytes. |
Extension methods for Streams. This file is not utilized in SolidShineUi at all, and will be removed in a future version.
public static string ReadAsciiString(Stream stream, int length)
Type | Name | Description |
---|---|---|
Stream |
stream | The stream to read the data from. |
int |
length | The number of characters in the string. |
Reads a ASCII string of the specified length.
The string read from the stream.
public static string ReadStringBigEndian(Stream stream, int length)
Type | Name | Description |
---|---|---|
Stream |
stream | The stream to read the data from. |
int |
length | The number of characters in the string. |
Reads a unicode string of the specified length in big-endian format.
The string read from the stream.
public static string ReadStringBigEndian(Stream stream)
Type | Name | Description |
---|---|---|
Stream |
stream | The stream to read the data from. |
Reads a unicode string from the current stream in big-endian format. The string is prefixed with the length.
The string read from the stream.
public static int ReadUInt16BigEndian(Stream stream)
Type | Name | Description |
---|---|---|
Stream |
stream | The stream to read the data from. |
Reads a 2-byte unsigned integer from the current stream using big-endian encoding and advances the position of the stream by two bytes.
A 2-byte unsigned integer read from the source stream.
public static int ReadUInt32BigEndian(Stream stream)
Type | Name | Description |
---|---|---|
Stream |
stream | The stream to read the data from. |
Reads a 4-byte unsigned integer from the current stream using big-endian encoding and advances the position of the stream by four bytes.
A 4-byte unsigned integer read from the source stream.
Generated with ModularDoc