C# Class RemoteViewing.Vnc.VncUtility

Provides utility methods.
Mostrar archivo Open project: qmfrederik/remoteviewing Class Usage Examples

Public Methods

Method Description
AllocateScratch ( int bytes, byte &scratch ) : byte[]

Allocates a byte array of a given size.

DecodeUInt16BE ( byte buffer, int offset ) : ushort

Decodes a ushort from a byte-array, in big-endian encoding.

DecodeUInt32BE ( byte buffer, int offset ) : uint

Decodes a uint from a byte-array, in big-endian encoding.

EncodeUInt16BE ( ushort value ) : byte[]

Encodes a ushort as a byte array in big-endian encoding.

EncodeUInt16BE ( byte buffer, int offset, ushort value ) : void

Encodes a ushort as a byte array in big-endian encoding.

EncodeUInt32BE ( uint value ) : byte[]

Encodes a uint as a byte array in big-endian encoding.

EncodeUInt32BE ( byte buffer, int offset, uint value ) : void

Encodes a uint as a byte array in big-endian encoding.

Method Details

AllocateScratch() public static method

Allocates a byte array of a given size.
public static AllocateScratch ( int bytes, byte &scratch ) : byte[]
bytes int /// The minimum required length of the byte array. ///
scratch byte /// A current byte array which can be re-used, if has enough size. ///
return byte[]

DecodeUInt16BE() public static method

Decodes a ushort from a byte-array, in big-endian encoding.
public static DecodeUInt16BE ( byte buffer, int offset ) : ushort
buffer byte /// A array which contains the . ///
offset int /// The index in at which the starts. ///
return ushort

DecodeUInt32BE() public static method

Decodes a uint from a byte-array, in big-endian encoding.
public static DecodeUInt32BE ( byte buffer, int offset ) : uint
buffer byte /// A array which contains the . ///
offset int /// The index in at which the starts. ///
return uint

EncodeUInt16BE() public static method

Encodes a ushort as a byte array in big-endian encoding.
public static EncodeUInt16BE ( ushort value ) : byte[]
value ushort /// The to encode. ///
return byte[]

EncodeUInt16BE() public static method

Encodes a ushort as a byte array in big-endian encoding.
public static EncodeUInt16BE ( byte buffer, int offset, ushort value ) : void
buffer byte /// The array in which to store the . ///
offset int /// The index of the first byte in at which the /// should be stored. ///
value ushort /// The to encode. ///
return void

EncodeUInt32BE() public static method

Encodes a uint as a byte array in big-endian encoding.
public static EncodeUInt32BE ( uint value ) : byte[]
value uint /// The to encode. ///
return byte[]

EncodeUInt32BE() public static method

Encodes a uint as a byte array in big-endian encoding.
public static EncodeUInt32BE ( byte buffer, int offset, uint value ) : void
buffer byte /// The array in which to store the . ///
offset int /// The index of the first byte in at which the /// should be stored. ///
value uint /// The to encode. ///
return void