SwapShort() public static method

Toggles the endianness of the specified 16-bit integer.
public static SwapShort ( short value ) : short
value short
return short
Beispiel #1
0
 public IByteBuf WriteUnsignedShort(int value)
 {
     _buf.WriteUnsignedShort(unchecked ((ushort)ByteBufferUtil.SwapShort((short)value)));
     return(this);
 }
Beispiel #2
0
 public IByteBuf WriteShort(int value)
 {
     _buf.WriteShort(ByteBufferUtil.SwapShort((short)value));
     return(this);
 }
Beispiel #3
0
 public IByteBuf SetShort(int index, int value)
 {
     _buf.SetShort(index, ByteBufferUtil.SwapShort((short)value));
     return(this);
 }
Beispiel #4
0
 public short ReadShort()
 {
     return(ByteBufferUtil.SwapShort(_buf.ReadShort()));
 }
Beispiel #5
0
 public short GetShort(int index)
 {
     return(ByteBufferUtil.SwapShort(_buf.GetShort(index)));
 }