Esempio n. 1
0
        public override IByteBuffer GetBytes(int index, Stream output, int length)
        {
            this.CheckIndex(index, length);

            fixed(byte *addr = &this.Addr(index))
            UnsafeByteBufferUtil.GetBytes(this, addr, index, output, length);

            return(this);
        }
Esempio n. 2
0
        public override IByteBuffer GetBytes(int index, byte[] dst, int dstIndex, int length)
        {
            this.CheckIndex(index, length);

            fixed(byte *addr = &this.Addr(index))
            UnsafeByteBufferUtil.GetBytes(this, addr, index, dst, dstIndex, length);

            return(this);
        }
 public sealed override IByteBuffer GetBytes(int index, byte[] dst, int dstIndex, int length)
 {
     if (dst is null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dst); }
     CheckDstIndex(index, length, dstIndex, dst.Length);
     fixed (byte* addr = &Addr(index))
     {
         UnsafeByteBufferUtil.GetBytes(addr, dst, dstIndex, length);
         return this;
     }
 }
Esempio n. 4
0
 public sealed override IByteBuffer GetBytes(int index, IByteBuffer dst, int dstIndex, int length)
 {
     if (dst is null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dst);
     }
     CheckDstIndex(index, length, dstIndex, dst.Capacity);
     UnsafeByteBufferUtil.GetBytes(this, Addr(index), index, dst, dstIndex, length);
     return(this);
 }
Esempio n. 5
0
 public override IByteBuffer GetBytes(int index, Stream output, int length)
 {
     UnsafeByteBufferUtil.GetBytes(this, this.Addr(index), index, output, length);
     return(this);
 }
Esempio n. 6
0
 public override IByteBuffer GetBytes(int index, IByteBuffer dst, int dstIndex, int length)
 {
     this.CheckIndex(index, length);
     UnsafeByteBufferUtil.GetBytes(this, this.Addr(index), index, dst, dstIndex, length);
     return(this);
 }