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

Used to read buffer.
Afficher le fichier Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

ReadASCIIString() public méthode

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
Résultat string

ReadByte() public méthode

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

ReadBytes() public méthode

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.
Résultat byte[]

ReadBytes() public méthode

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.
Résultat byte[]

ReadInt16() public méthode

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

ReadInt32() public méthode

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

ReadInt64() public méthode

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

ReadToEnd() public méthode

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

ReadUInt16() public méthode

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

ReadUInt32() public méthode

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

ReadUInt64() public méthode

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

ReadUnicodeString() public méthode

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
Résultat string