C# Class OpenStory.Common.IO.ByteOrder

Provides static helper methods for changing the byte order of numbers.
Exibir arquivo Open project: shoftee/OpenStory

Public Methods

Method Description
FlipBytes ( int &number ) : void

Flips the bytes of the specified number.

FlipBytes ( long &number ) : void

Flips the bytes of the specified number.

FlipBytes ( short &number ) : void

Flips the bytes of the specified number.

FlipBytes ( uint &number ) : void

Flips the bytes of the specified number.

FlipBytes ( ulong &number ) : void

Flips the bytes of the specified number.

FlipBytes ( ushort &number ) : void

Flips the bytes of the specified number.

HostToNetworkOrder ( int &number ) : void

Converts the byte order of the specified number from host order to network order (big-endian).

HostToNetworkOrder ( long &number ) : void

Converts the byte order of the specified number from host order to network order (big-endian).

HostToNetworkOrder ( short &number ) : void

Converts the byte order of the specified number from host order to network order (big-endian).

HostToNetworkOrder ( uint &number ) : void

Converts the byte order of the specified number from host order to network order (big-endian).

HostToNetworkOrder ( ulong &number ) : void

Converts the byte order of the specified number from host order to network order (big-endian).

HostToNetworkOrder ( ushort &number ) : void

Converts the byte order of the specified number from host order to network order (big-endian).

NetworkToHostOrder ( int &number ) : void

Converts the byte order of the specified number from network order (big-endian) to host order.

NetworkToHostOrder ( long &number ) : void

Converts the byte order of the specified number from network order (big-endian) to host order.

NetworkToHostOrder ( short &number ) : void

Converts the byte order of the specified number from network order (big-endian) to host order.

NetworkToHostOrder ( uint &number ) : void

Converts the byte order of the specified number from network order (big-endian) to host order.

NetworkToHostOrder ( ulong &number ) : void

Converts the byte order of the specified number from network order (big-endian) to host order.

NetworkToHostOrder ( ushort &number ) : void

Converts the byte order of the specified number from network order (big-endian) to host order.

Private Methods

Method Description
FlipNumber ( long number, int byteCount ) : long

Method Details

FlipBytes() public static method

Flips the bytes of the specified number.
public static FlipBytes ( int &number ) : void
number int The number to flip the bytes of.
return void

FlipBytes() public static method

Flips the bytes of the specified number.
public static FlipBytes ( long &number ) : void
number long The number to flip the bytes of.
return void

FlipBytes() public static method

Flips the bytes of the specified number.
public static FlipBytes ( short &number ) : void
number short The number to flip the bytes of.
return void

FlipBytes() public static method

Flips the bytes of the specified number.
public static FlipBytes ( uint &number ) : void
number uint The number to flip the bytes of.
return void

FlipBytes() public static method

Flips the bytes of the specified number.
public static FlipBytes ( ulong &number ) : void
number ulong The number to flip the bytes of.
return void

FlipBytes() public static method

Flips the bytes of the specified number.
public static FlipBytes ( ushort &number ) : void
number ushort The number to flip the bytes of.
return void

HostToNetworkOrder() public static method

Converts the byte order of the specified number from host order to network order (big-endian).
public static HostToNetworkOrder ( int &number ) : void
number int The number to convert.
return void

HostToNetworkOrder() public static method

Converts the byte order of the specified number from host order to network order (big-endian).
public static HostToNetworkOrder ( long &number ) : void
number long The number to convert.
return void

HostToNetworkOrder() public static method

Converts the byte order of the specified number from host order to network order (big-endian).
public static HostToNetworkOrder ( short &number ) : void
number short The number to convert.
return void

HostToNetworkOrder() public static method

Converts the byte order of the specified number from host order to network order (big-endian).
public static HostToNetworkOrder ( uint &number ) : void
number uint The number to convert.
return void

HostToNetworkOrder() public static method

Converts the byte order of the specified number from host order to network order (big-endian).
public static HostToNetworkOrder ( ulong &number ) : void
number ulong The number to convert.
return void

HostToNetworkOrder() public static method

Converts the byte order of the specified number from host order to network order (big-endian).
public static HostToNetworkOrder ( ushort &number ) : void
number ushort The number to convert.
return void

NetworkToHostOrder() public static method

Converts the byte order of the specified number from network order (big-endian) to host order.
public static NetworkToHostOrder ( int &number ) : void
number int The number to convert.
return void

NetworkToHostOrder() public static method

Converts the byte order of the specified number from network order (big-endian) to host order.
public static NetworkToHostOrder ( long &number ) : void
number long The number to convert.
return void

NetworkToHostOrder() public static method

Converts the byte order of the specified number from network order (big-endian) to host order.
public static NetworkToHostOrder ( short &number ) : void
number short The number to convert.
return void

NetworkToHostOrder() public static method

Converts the byte order of the specified number from network order (big-endian) to host order.
public static NetworkToHostOrder ( uint &number ) : void
number uint The number to convert.
return void

NetworkToHostOrder() public static method

Converts the byte order of the specified number from network order (big-endian) to host order.
public static NetworkToHostOrder ( ulong &number ) : void
number ulong The number to convert.
return void

NetworkToHostOrder() public static method

Converts the byte order of the specified number from network order (big-endian) to host order.
public static NetworkToHostOrder ( ushort &number ) : void
number ushort The number to convert.
return void