C# Class Microsoft.Protocols.TestSuites.Common.BufferReader

Used to read buffer.
Exibir arquivo Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
BufferReader ( byte buffer ) : System

Initializes a new instance of the BufferReader class.

ReadASCIIString ( ) : string

Reads a string into ASCII format from the current position and advances the current position of the buffer by string length bytes.

ReadByte ( ) : byte

Reads a byte from the current position and advances the current position of the buffer by one byte.

ReadBytes ( uint length ) : byte[]

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

ReadBytes ( uint index, uint length ) : byte[]

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

ReadInt16 ( ) : short

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

ReadInt32 ( ) : int

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

ReadInt64 ( ) : long

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

ReadToEnd ( ) : byte[]

Read bytes from current position to the end of buffer.

ReadUInt16 ( ) : ushort

Reads a 2-byte unsigned integer from the current position and advances the current position of the buffer by 2 bytes.

ReadUInt32 ( ) : uint

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

ReadUInt64 ( ) : ulong

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

ReadUnicodeString ( ) : string

Reads a string into Unicode format from the current position and advances the current position of the buffer by 2 * string length bytes.

Method Details

BufferReader() public method

Initializes a new instance of the BufferReader class.
public BufferReader ( byte buffer ) : System
buffer byte The buffer being read.
return System

ReadASCIIString() public method

Reads a string into ASCII format from the current position and advances the current position of the buffer by string length bytes.
public ReadASCIIString ( ) : string
return string

ReadByte() public method

Reads a byte from the current position and advances the current position of the buffer by one byte.
public ReadByte ( ) : byte
return byte

ReadBytes() public method

Reads the specified number of bytes from the current position into a byte array and advances the current position by that number of bytes.
public ReadBytes ( uint length ) : byte[]
length uint The number of bytes to read.
return byte[]

ReadBytes() public method

Reads the specified number of bytes from the position of index into a byte array and advances the current position by that number of bytes.
public ReadBytes ( uint index, uint length ) : byte[]
index uint The position of bytes to read.
length uint The number of bytes to read.
return byte[]

ReadInt16() public method

Reads a 2-byte signed integer from the current position and advances the current position of the buffer by 2 bytes.
public ReadInt16 ( ) : short
return short

ReadInt32() public method

Reads a 4-byte signed integer from the current position and advances the current position of the buffer by 4 bytes.
public ReadInt32 ( ) : int
return int

ReadInt64() public method

Reads an 8-byte signed integer from the current position and advances the current position of the buffer by 8 bytes.
public ReadInt64 ( ) : long
return long

ReadToEnd() public method

Read bytes from current position to the end of buffer.
public ReadToEnd ( ) : byte[]
return byte[]

ReadUInt16() public method

Reads a 2-byte unsigned integer from the current position and advances the current position of the buffer by 2 bytes.
public ReadUInt16 ( ) : ushort
return ushort

ReadUInt32() public method

Reads a 4-byte unsigned integer from the current position and advances the current position of the buffer by 4 bytes.
public ReadUInt32 ( ) : uint
return uint

ReadUInt64() public method

Reads an 8-byte unsigned integer from the current position and advances the current position of the buffer by 8 bytes.
public ReadUInt64 ( ) : ulong
return ulong

ReadUnicodeString() public method

Reads a string into Unicode format from the current position and advances the current position of the buffer by 2 * string length bytes.
public ReadUnicodeString ( ) : string
return string