ShortBuffer Class
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.
A short buffer.
[Android.Runtime.Register("java/nio/ShortBuffer", DoNotGenerateAcw=true)]
public abstract class ShortBuffer : Java.Nio.Buffer, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable
[<Android.Runtime.Register("java/nio/ShortBuffer", DoNotGenerateAcw=true)>]
type ShortBuffer = class
inherit Buffer
interface IComparable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Attributes
- Implements
Remarks
A short buffer.
This class defines four categories of operations upon short buffers:
<ul>
<li>
Absolute and relative #get() <i>get</i>
and #put(short) <i>put</i>
methods that read and write single shorts;
</li>
<li>
Relative #get(short[]) <i>bulk get</i>
methods that transfer contiguous sequences of shorts from this buffer into an array; and
</li>
<li>
Relative #put(short[]) <i>bulk put</i>
methods that transfer contiguous sequences of shorts from a short array or some other short buffer into this buffer; and
</li>
<li>
Methods for #compact compacting
, #duplicate duplicating
, and #slice slicing
a short buffer.
</li>
</ul>
Short buffers can be created either by #allocate <i>allocation</i>
, which allocates space for the buffer's
content, by #wrap(short[]) <i>wrapping</i>
an existing short array into a buffer, or by creating a <i>view</i> of an existing byte buffer.
Like a byte buffer, a short buffer is either <i>direct</i> or <i>non-direct</i>. A short buffer created via the wrap
methods of this class will be non-direct. A short 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 short 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.ShortBuffer
.
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
ShortBuffer(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
HasArray |
Tells whether or not this buffer is backed by an accessible short 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 short buffer. |
ArrayOffset() |
Returns the offset within this buffer's backing array of the first element of the buffer (optional operation). |
AsReadOnlyBuffer() |
Creates a new, read-only short 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 (optional operation). |
CompareTo(ShortBuffer) |
Compares this buffer to another. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Duplicate() |
Creates a new short 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(Int16[], Int32, Int32) |
Relative bulk get method. |
Get(Int16[]) |
Relative bulk get method. |
Get(Int32) |
Absolute 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(ShortBuffer) |
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(Int16) |
Relative put method (optional operation). |
Put(Int16[], Int32, Int32) |
Relative bulk put method (optional operation). |
Put(Int16[]) |
Relative bulk put method (optional operation). |
Put(Int32, Int16) |
Absolute put method (optional operation). |
Put(ShortBuffer) |
Relative bulk put method (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 short buffer whose content is a shared subsequence of this buffer's content. |
Slice(Int32, Int32) |
Creates a new short 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(Int16[], Int32, Int32) |
Wraps a short array into a buffer. |
Wrap(Int16[]) |
Wraps a short 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) |