/// <summary>Creates a new int buffer by wrapping the given int array.</summary> /// <remarks> /// Creates a new int buffer by wrapping the given int array. /// <p> /// The new buffer's position will be /// <code>start</code> /// , limit will be /// <code>start + intCount</code> /// , capacity will be the length of the array. /// </remarks> /// <param name="array">the int array which the new buffer will be based on.</param> /// <param name="start"> /// the start index, must not be negative and not greater than /// <code>array.length</code> /// </param> /// <param name="intCount"> /// the length, must not be negative and not greater than /// <code>array.length - start</code> /// . /// </param> /// <returns>the created int buffer.</returns> /// <exception> /// IndexOutOfBoundsException /// if either /// <code>start</code> /// or /// <code>intCount</code> /// is invalid. /// </exception> public static java.nio.IntBuffer wrap(int[] array_1, int start, int intCount) { java.util.Arrays.checkOffsetAndCount(array_1.Length, start, intCount); java.nio.IntBuffer buf = new java.nio.ReadWriteIntArrayBuffer(array_1); buf._position = start; buf._limit = start + intCount; return(buf); }
internal static java.nio.ReadWriteIntArrayBuffer copy(java.nio.IntArrayBuffer other , int markOfOther) { java.nio.ReadWriteIntArrayBuffer buf = new java.nio.ReadWriteIntArrayBuffer(other .capacity(), other.backingArray, other.offset); buf._limit = other._limit; buf._position = other.position(); buf._mark = markOfOther; return(buf); }
internal static java.nio.ReadWriteIntArrayBuffer copy(java.nio.IntArrayBuffer other , int markOfOther) { java.nio.ReadWriteIntArrayBuffer buf = new java.nio.ReadWriteIntArrayBuffer(other .capacity(), other.backingArray, other.offset); buf._limit = other._limit; buf._position = other.position(); buf._mark = markOfOther; return buf; }