C# Class Kafka.Client.Utils.BitWorks

Utilty class for managing bits and bytes.
Exibir arquivo Open project: precog/kafka

Public Methods

Method Description
GetBytesReversed ( int value ) : byte[]

Converts the value to bytes and reverses them.

GetBytesReversed ( long value ) : byte[]

Converts the value to bytes and reverses them.

GetBytesReversed ( short value ) : byte[]

Converts the value to bytes and reverses them.

ReverseBytes ( byte inArray ) : byte[]

Reverse the position of an array of bytes.

Method Details

GetBytesReversed() public static method

Converts the value to bytes and reverses them.
public static GetBytesReversed ( int value ) : byte[]
value int The value to convert to bytes.
return byte[]

GetBytesReversed() public static method

Converts the value to bytes and reverses them.
public static GetBytesReversed ( long value ) : byte[]
value long The value to convert to bytes.
return byte[]

GetBytesReversed() public static method

Converts the value to bytes and reverses them.
public static GetBytesReversed ( short value ) : byte[]
value short The value to convert to bytes.
return byte[]

ReverseBytes() public static method

Reverse the position of an array of bytes.
public static ReverseBytes ( byte inArray ) : byte[]
inArray byte /// The array to reverse. If null or zero-length then the returned array will be null. ///
return byte[]