Streaming utility methods.
More...
|
| static int | ReadInt (this BinaryReader reader, int offset=0) |
| | Read an integer from a binary reader. More...
|
| |
| static int | ReadInt (this Stream stream, int offset=0) |
| | Read an integer from a stream. More...
|
| |
| static long | SeekOrThrow (this Stream stream, long offset, SeekOrigin seekOrigin) |
| | Seek to a position in the stream or throw on error. More...
|
| |
Streaming utility methods.
◆ ReadInt() [1/2]
| static int Quantum.Core.StreamUtils.ReadInt |
( |
this BinaryReader |
reader, |
|
|
int |
offset = 0 |
|
) |
| |
|
inlinestatic |
Read an integer from a binary reader.
- Parameters
-
| reader | Reader |
| offset | Read position offset |
- Returns
- Converted integer that was read from the stream
- Exceptions
-
| ArgumentNullException | Is raised when the reader is null |
| Exception | Is raised when the integer could not be read from the stream |
◆ ReadInt() [2/2]
| static int Quantum.Core.StreamUtils.ReadInt |
( |
this Stream |
stream, |
|
|
int |
offset = 0 |
|
) |
| |
|
inlinestatic |
Read an integer from a stream.
- Parameters
-
| stream | Stream to read from |
| offset | Read position offset |
- Returns
- Exceptions
-
| ArgumentNullException | Is raised when the stream is null |
| Exception | Is raised when the stream is not readable, the offset is invalid or the integer could not be read |
◆ SeekOrThrow()
| static long Quantum.Core.StreamUtils.SeekOrThrow |
( |
this Stream |
stream, |
|
|
long |
offset, |
|
|
SeekOrigin |
seekOrigin |
|
) |
| |
|
inlinestatic |
Seek to a position in the stream or throw on error.
- Parameters
-
| stream | The stream to seek in |
| offset | The offset to seek to |
| seekOrigin | The origin to seek from |
- Returns
- The position after seeking
- Exceptions
-
| ArgumentNullException | Is raised when the stream is null |
| Exception | Is raised when the stream is not seek-able or the seeking failed. |