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

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