System::IO::BinaryReader class
Contents
[
Hide
]BinaryReader class
Represents a reader that reads primitive data types as binary data in particular encoding. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class BinaryReader : public System::IDisposable
Methods
Method | Description |
---|---|
BinaryReader(const SharedPtr<Stream>&) | Constructs an instance of BinaryReader class that reads data from the specified stream using UTF-8 encoding. |
BinaryReader(const SharedPtr<Stream>&, const SharedPtr<Text::Encoding>&) | Constructs an instance of BinaryReader class that reads data from the specified stream using the specified encoding. |
BinaryReader(const SharedPtr<Stream>&, const SharedPtr<Text::Encoding>&, bool) | Constructs an instance of BinaryReader class that reads data from the specified stream using the specified encoding. |
virtual Close() | Closes the current BinaryReader object and the underlying input stream. |
Dispose() override | Releases all resources used by the current object and closes the undelying stream. |
virtual get_BaseStream() | Returns the input stream. |
virtual PeekChar() | Reads a single character from the input stream without changing the stream’s read cursor. |
virtual Read() | Reads a single character from the input stream. |
virtual Read(ArrayPtr<uint8_t>, int, int) | Reads the specified number of bytes from the input stream and writes them to the specified byte array. |
virtual Read(ArrayPtr<char_t>, int, int) | Reads the specified number of characters from the input stream, converts them to UTF-16 encoding and writes the resulting UTF-16 characters to the specified character array starting at the specified position. |
virtual ReadBoolean() | Reads a single byte from the input stream and returns its boolean representation. |
virtual ReadByte() | Reads a single byte from the input stream. |
virtual ReadBytes(int) | Reads the specified number of bytes from the input stream. |
virtual ReadChar() | Reads a single character from the input stream. |
virtual ReadChars(int) | Reads the specified number of characters from the input stream and returns them in UTF-16 ecoding. |
virtual ReadDecimal() | NOT IMPLEMENTED. |
virtual ReadDouble() | Reads 8 bytes from the input stream and returns them as a double-precision floating point value. |
virtual ReadInt16() | Reads 2 bytes from the input stream and returns them as a 16-bit integer value. |
virtual ReadInt32() | Reads 4 bytes from the input stream and returns them as a 32-bit integer value. |
virtual ReadInt64() | Reads 8 bytes from the input stream and returns them as a 64-bit integer value. |
virtual ReadSByte() | Reads a single byte from the input stream and returns it as a signed 8-bit integer value. |
virtual ReadSingle() | Reads 4 bytes from the input stream and returns them as a single-precision floating point value. |
virtual ReadString() | Reads a string from the current stream. The string is prefixed with the length, encoded as an integer seven bits at a time. |
virtual ReadUInt16() | Reads 2 bytes from the input stream and returns them as an unsigned 16-bit integer value. |
virtual ReadUInt32() | Reads 4 bytes from the input stream and returns them as an unsigned 32-bit integer value. |
virtual ReadUInt64() | Reads 8 bytes from the input stream and returns them as an unsigned 64-bit integer value. |
virtual ~BinaryReader() | Destructor. |
See Also
- Class IDisposable
- Namespace System::IO
- Library Aspose.PUB for C++