System.IO.BinaryReader: Method Members

The methods of System.IO.BinaryReader are listed below. For a list of all members, see the BinaryReader Members list.

See Also: Inherited members from System.Object

Public Methods

Close()

Closes the current reader and the underlying stream.

Dispose()

Releases all resources used by the current instance of the System.IO.BinaryReader class.

PeekChar() : int

Returns the next available character and does not advance the byte or character position.

Read() : int

Reads characters from the underlying stream and advances the current position of the stream in accordance with the Encoding used and the specific character being read from the stream.

Read(byte[], int, int) : int

Reads the specified number of bytes from the stream, starting from a specified point in the byte array.

Read(char[], int, int) : int

Reads the specified number of characters from the stream, starting from a specified point in the character array.

ReadBoolean() : bool

Reads a Boolean value from the current stream and advances the current position of the stream by one byte.

ReadByte() : byte

Reads the next byte from the current stream and advances the current position of the stream by one byte.

ReadBytes(int) : byte[]

Reads the specified number of bytes from the current stream into a byte array and advances the current position by that number of bytes.

ReadChar() : char

Reads the next character from the current stream and advances the current position of the stream in accordance with the Encoding used and the specific character being read from the stream.

ReadChars(int) : char[]

Reads the specified number of characters from the current stream, returns the data in a character array, and advances the current position in accordance with the Encoding used and the specific character being read from the stream.

ReadDecimal() : decimal

Reads a decimal value from the current stream and advances the current position of the stream by sixteen bytes.

ReadDouble() : double

Reads an 8-byte floating point value from the current stream and advances the current position of the stream by eight bytes.

ReadInt16() : short

Reads a 2-byte signed integer from the current stream and advances the current position of the stream by two bytes.

ReadInt32() : int

Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four bytes.

ReadInt64() : long

Reads an 8-byte signed integer from the current stream and advances the current position of the stream by eight bytes.

ReadSByte() : sbyte

Reads a signed byte from this stream and advances the current position of the stream by one byte.

ReadSingle() : float

Reads a 4-byte floating point value from the current stream and advances the current position of the stream by four bytes.

ReadString() : string

Reads a string from the current stream. The string is prefixed with the length, encoded as an integer seven bits at a time.

ReadUInt16() : ushort

Reads a 2-byte unsigned integer from the current stream using little-endian encoding and advances the position of the stream by two bytes.

ReadUInt32() : uint

Reads a 4-byte unsigned integer from the current stream and advances the position of the stream by four bytes.

ReadUInt64() : ulong

Reads an 8-byte unsigned integer from the current stream and advances the position of the stream by eight bytes.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.IO.BinaryReader class and optionally releases the managed resources.

FillBuffer(int)

Fills the internal buffer with the specified number of bytes read from the stream.

Read7BitEncodedInt() : int

Reads in a 32-bit integer in compressed format.