Udostępnij za pośrednictwem


FloatBuffer Class

Definition

A float buffer.

[Android.Runtime.Register("java/nio/FloatBuffer", DoNotGenerateAcw=true)]
public abstract class FloatBuffer : Java.Nio.Buffer, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable
[<Android.Runtime.Register("java/nio/FloatBuffer", DoNotGenerateAcw=true)>]
type FloatBuffer = class
    inherit Buffer
    interface IComparable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
FloatBuffer
Attributes
Implements

Remarks

A float buffer.

This class defines four categories of operations upon float buffers:

<ul>

<li>

Absolute and relative #get() <i>get</i> and #put(float) <i>put</i> methods that read and write single floats;

</li>

<li>

Relative #get(float[]) <i>bulk get</i> methods that transfer contiguous sequences of floats from this buffer into an array; and

</li>

<li>

Relative #put(float[]) <i>bulk put</i> methods that transfer contiguous sequences of floats from a float array or some other float buffer into this buffer;&#32;and

</li>

<li>

Methods for #compact compacting, #duplicate duplicating, and #slice slicing a float buffer.

</li>

</ul>

Float buffers can be created either by #allocate <i>allocation</i>, which allocates space for the buffer's

content, by #wrap(float[]) <i>wrapping</i> an existing float array into a buffer, or by creating a <i>view</i> of an existing byte buffer.

Like a byte buffer, a float buffer is either <i>direct</i> or <i>non-direct</i>. A float buffer created via the wrap methods of this class will be non-direct. A float buffer created as a view of a byte buffer will be direct if, and only if, the byte buffer itself is direct. Whether or not a float buffer is direct may be determined by invoking the #isDirect isDirect method.

Methods in this class that do not otherwise have a value to return are specified to return the buffer upon which they are invoked. This allows method invocations to be chained.

Added in 1.4.

Java documentation for 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.

Constructors

FloatBuffer(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasArray

Tells whether or not this buffer is backed by an accessible float array.

HasRemaining

Tells whether there are any elements between the current position and the limit.

(Inherited from Buffer)
IsDirect

Returns true if this is a direct buffer.

(Inherited from Buffer)
IsReadOnly

Indicates whether this buffer is read-only.

(Inherited from Buffer)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Allocate(Int32)

Allocates a new float buffer.

ArrayOffset()

Returns the offset within this buffer's backing array of the first element of the buffer&nbsp;&nbsp;(optional operation).

AsReadOnlyBuffer()

Creates a new, read-only float buffer that shares this buffer's content.

Capacity()

Returns this buffer's capacity.

(Inherited from Buffer)
Clear()

Clears this buffer.

(Inherited from Buffer)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Compact()

Compacts this buffer&nbsp;&nbsp;(optional operation).

CompareTo(FloatBuffer)

Compares this buffer to another.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Duplicate()

Creates a new float buffer that shares this buffer's content.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Flip()

Flips this buffer.

(Inherited from Buffer)
Get()

Relative get method.

Get(Int32)

Absolute get method.

Get(Single[], Int32, Int32)

Relative bulk get method.

Get(Single[])

Relative bulk get method.

GetDirectBufferAddress() (Inherited from Buffer)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Limit()

Returns this buffer's limit.

(Inherited from Buffer)
Limit(Int32)

Sets this buffer's limit.

(Inherited from Buffer)
Mark()

Sets this buffer's mark at its position.

(Inherited from Buffer)
Mismatch(FloatBuffer)

Finds and returns the relative index of the first mismatch between this buffer and a given buffer.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Order()

Retrieves this buffer's byte order.

Position()

Returns this buffer's position.

(Inherited from Buffer)
Position(Int32)

Sets this buffer's position.

(Inherited from Buffer)
Put(FloatBuffer)

Relative bulk put method&nbsp;&nbsp;(optional operation).

Put(Int32, Single)

Absolute put method&nbsp;&nbsp;(optional operation).

Put(Single)

Relative put method&nbsp;&nbsp;(optional operation).

Put(Single[], Int32, Int32)

Relative bulk put method&nbsp;&nbsp;(optional operation).

Put(Single[])

Relative bulk put method&nbsp;&nbsp;(optional operation).

Remaining()

Returns the number of elements between the current position and the limit.

(Inherited from Buffer)
Reset()

Resets this buffer's position to the previously-marked position.

(Inherited from Buffer)
Rewind()

Rewinds this buffer.

(Inherited from Buffer)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
Slice()

Creates a new float buffer whose content is a shared subsequence of this buffer's content.

Slice(Int32, Int32)

Creates a new float buffer whose content is a shared subsequence of this buffer's content.

Slice(Int32, Int32)

Creates a new buffer whose content is a shared subsequence of this buffer's content.

(Inherited from Buffer)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wrap(Single[], Int32, Int32)

Wraps a float array into a buffer.

Wrap(Single[])

Wraps a float array into a buffer.

Explicit Interface Implementations

IComparable.CompareTo(Object)
IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to