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