C# Class Helios.Buffers.ByteBufferUtil

Utility class for working with direct ByteBuffer instances
ファイルを表示 Open project: helios-io/helios Class Usage Examples

Public Methods

Method Description
DecodeString ( IByteBuf src, int readerIndex, int len, Encoding encoding ) : string
HexDump ( IByteBuf buffer, int bytesPerLine = 16 ) : string
HexDump ( byte bytes, int bytesPerLine = 16 ) : string
SwapInt ( int value ) : int

Toggles the endianness of the specified 32-bit integer.

SwapLong ( long value ) : long

Toggles the endianness of the specified 64-bit long integer.

SwapShort ( short value ) : short

Toggles the endianness of the specified 16-bit integer.

Method Details

DecodeString() public static method

public static DecodeString ( IByteBuf src, int readerIndex, int len, Encoding encoding ) : string
src IByteBuf
readerIndex int
len int
encoding System.Text.Encoding
return string

HexDump() public static method

public static HexDump ( IByteBuf buffer, int bytesPerLine = 16 ) : string
buffer IByteBuf
bytesPerLine int
return string

HexDump() public static method

public static HexDump ( byte bytes, int bytesPerLine = 16 ) : string
bytes byte
bytesPerLine int
return string

SwapInt() public static method

Toggles the endianness of the specified 32-bit integer.
public static SwapInt ( int value ) : int
value int
return int

SwapLong() public static method

Toggles the endianness of the specified 64-bit long integer.
public static SwapLong ( long value ) : long
value long
return long

SwapShort() public static method

Toggles the endianness of the specified 16-bit integer.
public static SwapShort ( short value ) : short
value short
return short