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