C# Class Tx.Network.ByteArrayExtentions

Extentions to Byte[] to: - read bits at specified offsets from either a Byte or a network order UShort - read a single Byte or network order UShort - read an IPv4 Address
Datei anzeigen Open project: Reactive-Extensions/Tx

Public Methods

Method Description
AsByteArraySegment ( this source ) : ArraySegment
ReadBits ( this bytes, int bitPosition, int bitLength ) : byte
ReadBits ( this bytes, int bufferOffset, int bitPosition, int bitLength ) : byte
ReadIpAddress ( this bytes, int bufferOffset ) : IPAddress
ReadNetOrderUShort ( this bytes, int bufferOffset ) : ushort
ReadNetOrderUShort ( this bytes, int bufferOffset, int bitPosition, int bitLength ) : ushort
ReadUShort ( this bytes, int bufferOffset ) : ushort

Method Details

AsByteArraySegment() public static method

public static AsByteArraySegment ( this source ) : ArraySegment
source this
return ArraySegment

ReadBits() public static method

public static ReadBits ( this bytes, int bitPosition, int bitLength ) : byte
bytes this
bitPosition int
bitLength int
return byte

ReadBits() public static method

public static ReadBits ( this bytes, int bufferOffset, int bitPosition, int bitLength ) : byte
bytes this
bufferOffset int
bitPosition int
bitLength int
return byte

ReadIpAddress() public static method

public static ReadIpAddress ( this bytes, int bufferOffset ) : IPAddress
bytes this
bufferOffset int
return System.Net.IPAddress

ReadNetOrderUShort() public static method

public static ReadNetOrderUShort ( this bytes, int bufferOffset ) : ushort
bytes this
bufferOffset int
return ushort

ReadNetOrderUShort() public static method

public static ReadNetOrderUShort ( this bytes, int bufferOffset, int bitPosition, int bitLength ) : ushort
bytes this
bufferOffset int
bitPosition int
bitLength int
return ushort

ReadUShort() public static method

public static ReadUShort ( this bytes, int bufferOffset ) : ushort
bytes this
bufferOffset int
return ushort