public override IntBuffer Get(int[] dst, int offset, int length) { if (((long)length << 2) > Bits.JNI_COPY_TO_ARRAY_THRESHOLD) { CheckBounds(offset, length, dst.Length); int pos = Position(); int lim = Limit(); assert(pos <= lim); int rem = (pos <= lim ? lim - pos : 0); if (length > rem) { throw new BufferUnderflowException(); } if (Order() != ByteOrder.NativeOrder()) { Bits.copyToIntArray(Ix(pos), dst, (long)offset << 2, (long)length << 2); } else { Bits.CopyToArray(Ix(pos), dst, ArrayBaseOffset, (long)offset << 2, (long)length << 2); } Position(pos + length); } else { base.Get(dst, offset, length); } return(this); }
public override ByteBuffer Get(sbyte[] dst, int offset, int length) { if (((long)length << 0) > Bits.JNI_COPY_TO_ARRAY_THRESHOLD) { CheckBounds(offset, length, dst.Length); int pos = Position(); int lim = Limit(); assert(pos <= lim); int rem = (pos <= lim ? lim - pos : 0); if (length > rem) { throw new BufferUnderflowException(); } Bits.CopyToArray(Ix(pos), dst, ArrayBaseOffset, (long)offset << 0, (long)length << 0); Position(pos + length); } else { base.Get(dst, offset, length); } return(this); }