Example #1
0
        public void PutBytes(int index, byte[] src, int offset, int length)
        {
            BoundsCheck0(index, length);
            BufferUtil.BoundsCheck(src, offset, length);

            void *destination = _pBuffer + index;

            fixed(void *source = &src[offset])
            {
                ByteUtil.MemoryCopy(destination, source, (uint)length);
            }
        }
Example #2
0
        public void GetBytes(int index, byte[] dst, int offset, int length)
#endif
        {
            BoundsCheck0(index, length);
            BufferUtil.BoundsCheck(dst, offset, length);

            byte *source = _pBuffer + index;

            fixed(byte *destination = &dst[offset])
            {
                ByteUtil.MemoryCopy(destination, source, (uint)length);
            }
        }
Example #3
0
        public void PutBytes(int index, byte[] src, int offset, int length)
#endif
        {
            if (length == 0)
            {
                return;
            }

            BoundsCheck0(index, length);
            BufferUtil.BoundsCheck(src, offset, length);

            byte *destination = _pBuffer + index;

            fixed(byte *source = &src[offset])
            {
                ByteUtil.MemoryCopy(destination, source, (uint)length);
            }
        }
Example #4
0
        public void GetBytes(int index, byte[] dst, int offset, int length)
        {
            if (length == 0)
            {
                return;
            }

            BoundsCheck0(index, length);
            if (SHOULD_BOUNDS_CHECK)
            {
                BufferUtil.BoundsCheck(dst, offset, length);
            }

            byte *source = _pBuffer + index;

            fixed(byte *destination = &dst[offset])
            {
                ByteUtil.MemoryCopy(destination, source, (uint)length);
            }
        }