The binary reader that is able to read basic data types from a byte stream.
More...
|
| FlexibleBinaryReader (Stream inputStream, ByteOrder valueByteOrder) |
| Creates a new FlexibleBinaryReader that will be able to read basic data types from the given byte stream. More...
|
|
void | Read (byte[] outputBuffer, int offset, int length) |
| Reads the specified number of bytes from the current byte stream position. More...
|
|
byte[] | Read (int length) |
| Reads the specified number of bytes from the current byte stream position. More...
|
|
byte | ReadByte () |
| Reads a single byte from the current stream position. More...
|
|
sbyte | ReadSByte () |
| Reads a signed byte from the current stream position. More...
|
|
char | ReadChar () |
| Reads a 16-bit charater from the current stream position. More...
|
|
short | ReadInt16 () |
| Reads a 16-bit signed integer from the current stream position. More...
|
|
ushort | ReadUInt16 () |
| Reads a 16-bit unsigned integer from the current stream position. More...
|
|
int | ReadInt32 () |
| Reads a 32-bit signed integer from the current stream position. More...
|
|
uint | ReadUInt32 () |
| Reads a 32-bit unsigned integer from the current stream position. More...
|
|
long | ReadInt64 () |
| Reads a 64-bit signed integer from the current stream position. More...
|
|
ulong | ReadUInt64 () |
| Reads a 64-bit unsigned integer from the current stream position. More...
|
|
float | ReadHalf () |
| Returns a 16-bit floating point from the current stream position. More...
|
|
float | ReadSingle () |
| Returns a 32-bit floating point from the current stream position. More...
|
|
double | ReadDouble () |
| Returns a 64-bit floating point from the current stream position. More...
|
|
The binary reader that is able to read basic data types from a byte stream.
PushTechnology.ClientInterface.IO.FlexibleBinaryReader.FlexibleBinaryReader |
( |
Stream |
inputStream, |
|
|
ByteOrder |
valueByteOrder |
|
) |
| |
Creates a new FlexibleBinaryReader that will be able to read basic data types from the given byte stream.
The reader does not take ownership of the given inputStream . The stream needs to be disposed of if it is no longer needed.
- Parameters
-
inputStream | The byte stream to read from. |
valueByteOrder | The byte order to use for all reading operations. |
- Exceptions
-
ArgumentNullException | The given stream is null . |
ArgumentException | The given stream does not support reading. |
void PushTechnology.ClientInterface.IO.FlexibleBinaryReader.Read |
( |
byte[] |
outputBuffer, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
Reads the specified number of bytes from the current byte stream position.
- Parameters
-
outputBuffer | The buffer to read data into. |
offset | The starting index of the output buffer. |
length | The number of bytes to read. |
- Exceptions
-
ArgumentNullException | The given buffer is null . |
ArgumentOutOfRangeException | The given offset or length are negative or bigger than the given buffer. |
EndOfStreamException | The stream has reached the end before finishing the operation. |
byte [] PushTechnology.ClientInterface.IO.FlexibleBinaryReader.Read |
( |
int |
length | ) |
|
Reads the specified number of bytes from the current byte stream position.
- Parameters
-
length | The number of bytes to read. |
- Returns
- The byte array containing the data that has been read from the input stream.
- Exceptions
-
ArgumentOutOfRangeException | The given length is negative. |
EndOfStreamException | The stream has reached the end before finishing the operation. |
byte PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadByte |
( |
| ) |
|
Reads a single byte from the current stream position.
- Returns
- The byte from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
char PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadChar |
( |
| ) |
|
Reads a 16-bit charater from the current stream position.
- Returns
- The 16-bit character form the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
double PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadDouble |
( |
| ) |
|
Returns a 64-bit floating point from the current stream position.
- Returns
- The 64-bit floating point from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
float PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadHalf |
( |
| ) |
|
Returns a 16-bit floating point from the current stream position.
Since there is no 16-bit floating point value type the result will be returned as a 32-bit floating point.
- Returns
- The 16-bit floating point from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
short PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadInt16 |
( |
| ) |
|
Reads a 16-bit signed integer from the current stream position.
- Returns
- The 16-bit signed integer from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
int PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadInt32 |
( |
| ) |
|
Reads a 32-bit signed integer from the current stream position.
- Returns
- The 32-bit signed integer from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
long PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadInt64 |
( |
| ) |
|
Reads a 64-bit signed integer from the current stream position.
- Returns
- The 64-bit signed integer from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
sbyte PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadSByte |
( |
| ) |
|
Reads a signed byte from the current stream position.
- Returns
- The signed byte from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
float PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadSingle |
( |
| ) |
|
Returns a 32-bit floating point from the current stream position.
- Returns
- The 32-bit floating point from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
ushort PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadUInt16 |
( |
| ) |
|
Reads a 16-bit unsigned integer from the current stream position.
- Returns
- The 16-bit unsigned integer from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
uint PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadUInt32 |
( |
| ) |
|
Reads a 32-bit unsigned integer from the current stream position.
- Returns
- The 32-bit unsigned integer from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
ulong PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ReadUInt64 |
( |
| ) |
|
Reads a 64-bit unsigned integer from the current stream position.
- Returns
- The 64-bit unsigned integer from the current stream position.
- Exceptions
-
EndOfStreamException | The stream has reached the end before finishing the operation. |
Stream PushTechnology.ClientInterface.IO.FlexibleBinaryReader.BaseStream => inputStream |
Returns the underlying stream.
ByteOrder PushTechnology.ClientInterface.IO.FlexibleBinaryReader.ByteOrder => byteOrder |
Returns the byte order the reader operates in.
bool PushTechnology.ClientInterface.IO.FlexibleBinaryReader.IsEndOfStream => inputStream.Position >= inputStream.Length |
Returns true if the reader reached the end of the stream.
The documentation for this class was generated from the following file:
- IO.Public/FlexibleBinaryReader.cs