FloatBuffer.Put Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Put(FloatBuffer) |
Relative bulk put method (optional operation). |
Put(Single) |
Relative put method (optional operation). |
Put(Single[]) |
Relative bulk put method (optional operation). |
Put(Int32, Single) |
Absolute put method (optional operation). |
Put(Single[], Int32, Int32) |
Relative bulk put method (optional operation). |
Put(FloatBuffer)
Relative bulk put method (optional operation).
[Android.Runtime.Register("put", "(Ljava/nio/FloatBuffer;)Ljava/nio/FloatBuffer;", "GetPut_Ljava_nio_FloatBuffer_Handler")]
public virtual Java.Nio.FloatBuffer? Put (Java.Nio.FloatBuffer? src);
[<Android.Runtime.Register("put", "(Ljava/nio/FloatBuffer;)Ljava/nio/FloatBuffer;", "GetPut_Ljava_nio_FloatBuffer_Handler")>]
abstract member Put : Java.Nio.FloatBuffer -> Java.Nio.FloatBuffer
override this.Put : Java.Nio.FloatBuffer -> Java.Nio.FloatBuffer
Parameters
- src
- FloatBuffer
The source buffer from which floats are to be read; must not be this buffer
Returns
This buffer
- Attributes
Exceptions
if src.remaining()
is greater than this buffer's
remaining()
.
if src
is this buffer.
if no changes may be made to the contents of this buffer.
Remarks
Relative bulk put method (optional operation).
This method transfers the floats remaining in the given source buffer into this buffer. If there are more floats remaining in the source buffer than in this buffer, that is, if src.remaining()
>
remaining()
, then no floats are transferred and a BufferOverflowException
is thrown.
Otherwise, this method copies n = src.remaining()
floats from the given buffer into this buffer, starting at each buffer's current position. The positions of both buffers are then incremented by n.
In other words, an invocation of this method of the form dst.put(src)
has exactly the same effect as the loop
while (src.hasRemaining())
dst.put(src.get());
except that it first checks that there is sufficient space in this buffer and it is potentially much more efficient.
Java documentation for java.nio.FloatBuffer.put(java.nio.FloatBuffer)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Put(Single)
Relative put method (optional operation).
[Android.Runtime.Register("put", "(F)Ljava/nio/FloatBuffer;", "GetPut_FHandler")]
public abstract Java.Nio.FloatBuffer? Put (float f);
[<Android.Runtime.Register("put", "(F)Ljava/nio/FloatBuffer;", "GetPut_FHandler")>]
abstract member Put : single -> Java.Nio.FloatBuffer
Parameters
- f
- Single
The float to be written
Returns
This buffer
- Attributes
Exceptions
if position is equal or greater than limit.
if no changes may be made to the contents of this buffer.
Remarks
Relative put method (optional operation).
Writes the given float into this buffer at the current position, and then increments the position.
Java documentation for java.nio.FloatBuffer.put(float)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Put(Single[])
Relative bulk put method (optional operation).
[Android.Runtime.Register("put", "([F)Ljava/nio/FloatBuffer;", "")]
public Java.Nio.FloatBuffer? Put (float[]? src);
[<Android.Runtime.Register("put", "([F)Ljava/nio/FloatBuffer;", "")>]
member this.Put : single[] -> Java.Nio.FloatBuffer
Parameters
- src
- Single[]
The source array
Returns
This buffer
- Attributes
Exceptions
if remaining()
is less than src.length
.
if no changes may be made to the contents of this buffer.
Remarks
Relative bulk put method (optional operation).
This method transfers the entire content of the given source float array into this buffer. An invocation of this method of the form dst.put(a)
behaves in exactly the same way as the invocation
dst.put(a, 0, a.length)
Java documentation for java.nio.FloatBuffer.put(float[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Put(Int32, Single)
Absolute put method (optional operation).
[Android.Runtime.Register("put", "(IF)Ljava/nio/FloatBuffer;", "GetPut_IFHandler")]
public abstract Java.Nio.FloatBuffer? Put (int index, float f);
[<Android.Runtime.Register("put", "(IF)Ljava/nio/FloatBuffer;", "GetPut_IFHandler")>]
abstract member Put : int * single -> Java.Nio.FloatBuffer
Parameters
- index
- Int32
The index at which the float will be written
- f
- Single
The float value to be written
Returns
This buffer
- Attributes
Exceptions
if index is invalid.
if no changes may be made to the contents of this buffer.
Remarks
Absolute put method (optional operation).
Writes the given float into this buffer at the given index.
Java documentation for java.nio.FloatBuffer.put(int, float)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Put(Single[], Int32, Int32)
Relative bulk put method (optional operation).
[Android.Runtime.Register("put", "([FII)Ljava/nio/FloatBuffer;", "GetPut_arrayFIIHandler")]
public virtual Java.Nio.FloatBuffer? Put (float[]? src, int offset, int length);
[<Android.Runtime.Register("put", "([FII)Ljava/nio/FloatBuffer;", "GetPut_arrayFIIHandler")>]
abstract member Put : single[] * int * int -> Java.Nio.FloatBuffer
override this.Put : single[] * int * int -> Java.Nio.FloatBuffer
Parameters
- src
- Single[]
The array from which floats are to be read
- offset
- Int32
The offset within the array of the first float to be read;
must be non-negative and no larger than array.length
- length
- Int32
The number of floats to be read from the given array;
must be non-negative and no larger than
array.length - offset
Returns
This buffer
- Attributes
Exceptions
if remaining()
is less than floatCount
.
if either srcOffset
or floatCount
is invalid.
if no changes may be made to the contents of this buffer.
Remarks
Relative bulk put method (optional operation).
This method transfers floats into this buffer from the given source array. If there are more floats to be copied from the array than remain in this buffer, that is, if length
>
remaining()
, then no floats are transferred and a BufferOverflowException
is thrown.
Otherwise, this method copies length
floats from the given array into this buffer, starting at the given offset in the array and at the current position of this buffer. The position of this buffer is then incremented by length
.
In other words, an invocation of this method of the form dst.put(src, off, len)
has exactly the same effect as the loop
{@code
for (int i = off; i < off + len; i++)
dst.put(a[i]);
}
except that it first checks that there is sufficient space in this buffer and it is potentially much more efficient.
Java documentation for java.nio.FloatBuffer.put(float[], int, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.