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