/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (float[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 2)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 2); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (char[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 1)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 1); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (int[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 2)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 2); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (int[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 2)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 2); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (long[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 3)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 3); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (byte[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (short[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 1)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 1); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (float[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 2)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 2); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (char[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 1)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 1); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (long[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 3)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 3); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (double[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 3)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 3); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (byte[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (short[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 1)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 1); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (double[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 3)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 3); }
/** Copies the contents of src to dst, starting from the current position of src, copying numElements elements (using the data * type of src, no matter the datatype of dst). The dst {@link Buffer#position()} is used as the writing offset. The position * of both Buffers will stay the same. The limit of the src Buffer will stay the same. The limit of the dst Buffer will be set * to dst.position() + numElements, where numElements are translated to the number of elements appropriate for the dst Buffer * data type. <b>The Buffers must be direct Buffers with native byte order. No error checking is performed</b>. * * @param src the source Buffer. * @param dst the destination Buffer. * @param numElements the number of elements to copy. */ public static void copy (Buffer src, Buffer dst, int numElements) { int numBytes = elementsToBytes(src, numElements); dst.limit(dst.position() + bytesToElements(dst, numBytes)); copyJni(src, positionInBytes(src), dst, positionInBytes(dst), numBytes); }
/** Copies the contents of src to dst, starting from the current position of src, copying numElements elements (using the data * type of src, no matter the datatype of dst). The dst {@link Buffer#position()} is used as the writing offset. The position * of both Buffers will stay the same. The limit of the src Buffer will stay the same. The limit of the dst Buffer will be set * to dst.position() + numElements, where numElements are translated to the number of elements appropriate for the dst Buffer * data type. <b>The Buffers must be direct Buffers with native byte order. No error checking is performed</b>. * * @param src the source Buffer. * @param dst the destination Buffer. * @param numElements the number of elements to copy. */ public static void copy (Buffer src, Buffer dst, int numElements) { int numBytes = elementsToBytes(src, numElements); dst.limit(dst.position() + bytesToElements(dst, numBytes)); copyJni(src, positionInBytes(src), dst, positionInBytes(dst), numBytes); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (double[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 3)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 3); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (long[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 3)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 3); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (byte[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements); }
/** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} * instance's {@link Buffer#position()} is used to define the offset into the Buffer itself. The position will stay the same, * the limit will be set to position + numElements. <b>The Buffer must be a direct Buffer with native byte order. No error * checking is performed</b>. * * @param src the source array. * @param srcOffset the offset into the source array. * @param dst the destination Buffer, its position is used as an offset. * @param numElements the number of elements to copy. */ public static void copy (int[] src, int srcOffset, Buffer dst, int numElements) { dst.limit(dst.position() + bytesToElements(dst, numElements << 2)); copyJni(src, srcOffset, dst, positionInBytes(dst), numElements << 2); }