public override ByteBuf SetBytes(int index, ByteBuf src, int srcIndex, int length) { CheckSrcIndex(index, length, srcIndex, src.Capacity); if (length == 0) { return(this); } int i = ToComponentIndex(index); while (length > 0) { Component c = _components[i]; ByteBuf s = c._buf; int adjustment = c._offset; int localLength = Math.Min(length, s.Capacity - (index - adjustment)); s.SetBytes(index - adjustment, src, srcIndex, localLength); index += localLength; srcIndex += localLength; length -= localLength; i++; } return(this); }
public override ByteBuf SetBytes(int index, sbyte[] src, int srcIndex, int length) { _buffer.SetBytes(index, src, srcIndex, length); return(this); }
public override ByteBuf SetBytes(int index, sbyte[] src, int srcIndex, int length) { CheckIndex(index, length); _buffer.SetBytes(index + _adjustment, src, srcIndex, length); return(this); }