共用方式為


IntBuffer Class

Definition

An int buffer.

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

Remarks

An int buffer.

This class defines four categories of operations upon int buffers:

<ul>

<li>

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

</li>

<li>

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

</li>

<li>

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

</li>

<li>

Methods for #compact compacting, #duplicate duplicating, and #slice slicing an int buffer.

</li>

</ul>

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

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

Like a byte buffer, an int buffer is either <i>direct</i> or <i>non-direct</i>. A int buffer created via the wrap methods of this class will be non-direct. An int 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 an int 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.IntBuffer.

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

IntBuffer(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 int 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 int 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 int 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(IntBuffer)

Compares this buffer to another.

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

Creates a new int 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(Int32[], Int32, Int32)

Relative bulk get method.

Get(Int32[])

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(IntBuffer)

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(Int32, Int32)

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

Put(Int32)

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

Put(Int32[], Int32, Int32)

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

Put(Int32[])

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

Put(IntBuffer)

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 int buffer whose content is a shared subsequence of this buffer's content.

Slice(Int32, Int32)

Creates a new int 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(Int32[], Int32, Int32)

Wraps an int array into a buffer.

Wrap(Int32[])

Wraps an int 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