Utility class for working with direct ByteBuffer instances
Beispiel #1
0
 public IByteBuf SetUnsignedShort(int index, int value)
 {
     unchecked
     {
         _buf.SetUnsignedShort(index, (ushort)ByteBufferUtil.SwapShort((short)value));
     }
     return(this);
 }
Beispiel #2
0
 public IByteBuf SetUnsignedInt(int index, uint value)
 {
     unchecked
     {
         _buf.SetUnsignedInt(index, (uint)ByteBufferUtil.SwapInt((int)value));
     }
     return(this);
 }
Beispiel #3
0
        public IByteBuf WriteUnsignedInt(uint value)
        {
            unchecked
            {
                _buf.WriteUnsignedInt((uint)ByteBufferUtil.SwapInt((int)value));
            }

            return(this);
        }
Beispiel #4
0
 public IByteBuf WriteInt(int value)
 {
     _buf.WriteInt(ByteBufferUtil.SwapInt(value));
     return(this);
 }
Beispiel #5
0
 public IByteBuf WriteUnsignedShort(int value)
 {
     _buf.WriteUnsignedShort(unchecked ((ushort)ByteBufferUtil.SwapShort((short)value)));
     return(this);
 }
Beispiel #6
0
 public IByteBuf WriteShort(int value)
 {
     _buf.WriteShort(ByteBufferUtil.SwapShort((short)value));
     return(this);
 }
Beispiel #7
0
 public long ReadLong()
 {
     return(ByteBufferUtil.SwapLong(_buf.ReadLong()));
 }
Beispiel #8
0
 public int ReadInt()
 {
     return(ByteBufferUtil.SwapInt(_buf.ReadInt()));
 }
Beispiel #9
0
 public IByteBuf SetLong(int index, long value)
 {
     _buf.SetLong(index, ByteBufferUtil.SwapLong(value));
     return(this);
 }
Beispiel #10
0
 public IByteBuf SetInt(int index, int value)
 {
     _buf.SetInt(index, ByteBufferUtil.SwapInt(value));
     return(this);
 }
Beispiel #11
0
 public IByteBuf SetShort(int index, int value)
 {
     _buf.SetShort(index, ByteBufferUtil.SwapShort((short)value));
     return(this);
 }
Beispiel #12
0
 public long GetLong(int index)
 {
     return(ByteBufferUtil.SwapLong(_buf.GetLong(index)));
 }
Beispiel #13
0
 public int GetInt(int index)
 {
     return(ByteBufferUtil.SwapInt(_buf.GetInt(index)));
 }
Beispiel #14
0
 public short GetShort(int index)
 {
     return(ByteBufferUtil.SwapShort(_buf.GetShort(index)));
 }
Beispiel #15
0
 public IByteBuf WriteLong(long value)
 {
     _buf.WriteLong(ByteBufferUtil.SwapLong(value));
     return(this);
 }
Beispiel #16
0
 public string ToString(Encoding encoding)
 {
     return(ByteBufferUtil.DecodeString(this, ReaderIndex, ReadableBytes, encoding));
 }
Beispiel #17
0
 public short ReadShort()
 {
     return(ByteBufferUtil.SwapShort(_buf.ReadShort()));
 }