C# Class Dse.EndianBitConverter

Equivalent of System.BitConverter but let's you choose the endianness.
显示文件 Open project: datastax/csharp-driver-dse

Public Methods

Method Description
ToDouble ( bool isLittleEndian, byte buffer, int offset ) : double

Returns a signed 64-bit double from eight bytes at specified offset from the buffer.

ToInt64 ( bool isLittleEndian, byte buffer, int offset ) : long

Returns a signed 64-bit integer from eight bytes at specified offset from the buffer.

Private Methods

Method Description
SetBytes ( bool isLittleEndian, byte buffer, int offset, double value ) : void

Converts an 64-bit double into an array of bytes and sets to the buffer starting at the specified offset.

SetBytes ( bool isLittleEndian, byte buffer, int offset, int value ) : void

Converts an int into an array of bytes and sets to the buffer starting at the specified offset.

SetBytes ( bool isLittleEndian, byte buffer, int offset, long value ) : void

Converts an int into an array of bytes and sets to the buffer starting at the specified offset.

ToInt32 ( bool isLittleEndian, byte buffer, int offset ) : int

Returns a signed 32-bit integer from four bytes at specified offset from the buffer.

Method Details

ToDouble() public static method

Returns a signed 64-bit double from eight bytes at specified offset from the buffer.
public static ToDouble ( bool isLittleEndian, byte buffer, int offset ) : double
isLittleEndian bool
buffer byte
offset int
return double

ToInt64() public static method

Returns a signed 64-bit integer from eight bytes at specified offset from the buffer.
public static ToInt64 ( bool isLittleEndian, byte buffer, int offset ) : long
isLittleEndian bool
buffer byte
offset int
return long