| BinaryReader |
The bytes from a stream can be read and cast to a specific datatype. Each datatype will determine the number of bytes to be read from the stream. Once the number of bytes have been read, they are assembled into the requested datatype, advancing the position in the stream the required number of bytes.
Characters can be read from the Stream using the provided Encoding system. The default encoding system is equal to New UTF8Encoding.
To create a new BinaryReader use the public constructor.
Set reader = Cor.NewBinaryReader(MyFileStream) - or - Set reader = NewBinaryReader(MyFileStream)
Project VBCorLib Overview | Constructors | BinaryWriter
| IObject |
| Name | Description |
|---|---|
BaseStream (get) | Returns the underlying Stream being read by the Reader. |
| Name | Description |
|---|---|
CloseReader | Closes the reader and underlying Stream. |
Equals | Returns a boolean indicating if the value and this object instance are the same instance. |
GetHashCode | Returns a pseudo-unique number identifying this instance. |
PeekChar | Returns the next character to be decoded from the byte stream. The position in the stream is not advanced after the read. |
Read | Fills either a Byte array or Integer array with the specified number of elements. Or returns the next character to be decoded from the stream. |
ReadBoolean | Returns a boolean from the stream. |
ReadByte | Reads the next byte in the stream, and advances the position one byte. |
ReadBytes | Reads the specified number of bytes from the stream and returns them in an array. |
ReadChar | Reads the next decode character in the stream, and advances the position the number of bytes requirece to assemble a single character. |
ReadChars | Returns a specified number of characters decoded from the stream. |
ReadCurrency | Reads 8 bytes from the stream and returns them as a Currency datatype. |
ReadDate | Reads 8 bytes from the stream and returns them as a Date datatype. |
ReadDecimal | Reads 16 bytes from the stream and returns them as a Variant Decimal datatype. |
ReadDouble | Reads 8 bytes from the stream and returns them as a Double datatype. |
ReadInteger | Reads 2 bytes from the stream and returns them as an Integer datatype. |
ReadLong | Reads 4 bytes from the stream and returns them as a Long datatype. |
ReadSingle | Reads 4 bytes from the stream and returns them as a Single datatype. |
ReadString | Reads a String from the stream. |
ToString | Returns a string representation of this object instance. |