EndianOrder Class

Represents an endian byte order interoperability class.

Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.110 -- Release Build+3e0464f4461df4d3e1175b13966eb47ff832554d
public class EndianOrder
Inheritance
Object    EndianOrder
Derived

Remarks

Intel systems use little-endian byte order, other systems, such as Unix, use big-endian byte ordering. Little-endian ordering means bits are ordered such that the bit whose in-memory representation is right-most is the most-significant-bit in a byte. Big-endian ordering means bits are ordered such that the bit whose in-memory representation is left-most is the most-significant-bit in a byte.

Constructors

EndianOrder Constructs a new instance of the EndianOrder class.

Methods

CopyBytes(Boolean, Byte, Int32) Copies the specified Boolean value as an array of 1 byte in the target endian-order to the destination array.
CopyBytes(Char, Byte, Int32) Copies the specified Unicode character value as an array of 2 bytes in the target endian-order to the destination array.
CopyBytes(Double, Byte, Int32) Copies the specified double-precision floating point value as an array of 8 bytes in the target endian-order to the destination array.
CopyBytes(Int16, Byte, Int32) Copies the specified 16-bit signed integer value as an array of 2 bytes in the target endian-order to the destination array.
CopyBytes(Int32, Byte, Int32) Copies the specified 32-bit signed integer value as an array of 4 bytes in the target endian-order to the destination array.
CopyBytes(Int64, Byte, Int32) Copies the specified 64-bit signed integer value as an array of 8 bytes in the target endian-order to the destination array.
CopyBytes(Single, Byte, Int32) Copies the specified single-precision floating point value as an array of 4 bytes in the target endian-order to the destination array.
CopyBytes(UInt16, Byte, Int32) Copies the specified 16-bit unsigned integer value as an array of 2 bytes in the target endian-order to the destination array.
CopyBytes(UInt32, Byte, Int32) Copies the specified 32-bit unsigned integer value as an array of 4 bytes in the target endian-order to the destination array.
CopyBytes(UInt64, Byte, Int32) Copies the specified 64-bit unsigned integer value as an array of 8 bytes in the target endian-order to the destination array.
CopyBytesT(T, Byte, Int32) Copies the specified primitive type value as an array of bytes in the target endian-order to the destination array.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetBytes(Boolean) Returns the specified Boolean value as an array of bytes in the target endian-order.
GetBytes(Char) Returns the specified Unicode character value as an array of bytes in the target endian-order.
GetBytes(Double) Returns the specified double-precision floating point value as an array of bytes in the target endian-order.
GetBytes(Int16) Returns the specified 16-bit signed integer value as an array of bytes.
GetBytes(Int32) Returns the specified 32-bit signed integer value as an array of bytes.
GetBytes(Int64) Returns the specified 64-bit signed integer value as an array of bytes.
GetBytes(Single) Returns the specified single-precision floating point value as an array of bytes in the target endian-order.
GetBytes(UInt16) Returns the specified 16-bit unsigned integer value as an array of bytes.
GetBytes(UInt32) Returns the specified 32-bit unsigned integer value as an array of bytes.
GetBytes(UInt64) Returns the specified 64-bit unsigned integer value as an array of bytes.
GetBytesT(T) Returns the specified value as an array of bytes in the target endian-order.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToBoolean Returns a Boolean value converted from one byte at a specified position in a byte array.
ToChar Returns a Unicode character converted from two bytes, accounting for target endian-order, at a specified position in a byte array.
ToDouble Returns a double-precision floating point number converted from eight bytes, accounting for target endian-order, at a specified position in a byte array.
ToInt16 Returns a 16-bit signed integer converted from two bytes, accounting for target endian-order, at a specified position in a byte array.
ToInt32 Returns a 32-bit signed integer converted from four bytes, accounting for target endian-order, at a specified position in a byte array.
ToInt64 Returns a 64-bit signed integer converted from eight bytes, accounting for target endian-order, at a specified position in a byte array.
ToSingle Returns a single-precision floating point number converted from four bytes, accounting for target endian-order, at a specified position in a byte array.
ToStringReturns a string that represents the current object.
(Inherited from Object)
ToUInt16 Returns a 16-bit unsigned integer converted from two bytes, accounting for target endian-order, at a specified position in a byte array.
ToUInt32 Returns a 32-bit unsigned integer converted from four bytes, accounting for target endian-order, at a specified position in a byte array.
ToUInt64 Returns a 64-bit unsigned integer converted from eight bytes, accounting for target endian-order, at a specified position in a byte array.

Fields

BigEndian Default instance of the BigEndianOrder conversion class.
LittleEndian Default instance of the LittleEndianOrder conversion class.
NativeEndian Default instance of the NativeEndianOrder conversion class.
NativeEndianness Gets the native Endianness of the executing architecture.
TargetEndianness Returns the target endian-order of this EndianOrder representation.

Extension Methods

GetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
GetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)

See Also