ByteBuffer 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 byte buffer.
[Android.Runtime.Register("java/nio/ByteBuffer", DoNotGenerateAcw=true)]
public abstract class ByteBuffer : Java.Nio.Buffer, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable
[<Android.Runtime.Register("java/nio/ByteBuffer", DoNotGenerateAcw=true)>]
type ByteBuffer = class
inherit Buffer
interface IComparable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Derived
- Attributes
- Implements
Remarks
Java documentation for java.nio.ByteBuffer
.
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
ByteBuffer(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
Char |
Returns the char at the current position and increases the position by 2. |
Class |
Returns the runtime class of this |
Double |
Returns the double at the current position and increases the position by 8. |
Float |
Returns the float at the current position and increases the position by 4. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
HasArray |
Tells whether or not this buffer is backed by an accessible byte array. |
HasRemaining |
Tells whether there are any elements between the current position and the limit. (Inherited from Buffer) |
Int |
Returns the int at the current position and increases the position by 4. |
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 | |
Long |
Returns the long at the current position and increases the position by 8. |
PeerReference | (Inherited from Object) |
Short |
Returns the short at the current position and increases the position by 2. |
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
AlignedSlice(Int32) |
Creates a new byte buffer whose content is a shared and aligned subsequence of this buffer's content. |
AlignmentOffset(Int32, Int32) |
Returns the memory address, pointing to the byte at the given index, modulus the given unit size. |
Allocate(Int32) |
Allocates a new byte buffer. |
AllocateDirect(Int32) |
Allocates a new direct byte buffer. |
ArrayOffset() |
Returns the offset within this buffer's backing array of the first element of the buffer (optional operation). |
AsCharBuffer() |
Creates a view of this byte buffer as a char buffer. |
AsDoubleBuffer() |
Creates a view of this byte buffer as a double buffer. |
AsFloatBuffer() |
Creates a view of this byte buffer as a float buffer. |
AsIntBuffer() |
Creates a view of this byte buffer as an int buffer. |
AsLongBuffer() |
Creates a view of this byte buffer as a long buffer. |
AsReadOnlyBuffer() |
Creates a new, read-only byte buffer that shares this buffer's content. |
AsShortBuffer() |
Creates a view of this byte buffer as a short buffer. |
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(ByteBuffer) |
Compares this buffer to another. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Duplicate() |
Creates a new byte 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(Byte[]) |
Relative bulk get method. |
Get(Byte[], Int32, Int32) |
Relative bulk get method. |
Get(Int32) |
Absolute get method. |
GetChar(Int32) |
Absolute get method for reading a char value. |
GetDirectBufferAddress() | (Inherited from Buffer) |
GetDouble(Int32) |
Absolute get method for reading a double value. |
GetFloat(Int32) |
Absolute get method for reading a float value. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetInt(Int32) |
Absolute get method for reading an int value. |
GetLong(Int32) |
Absolute get method for reading a long value. |
GetShort(Int32) |
Absolute get method for reading a short value. |
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) |
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. |
Order(ByteOrder) |
Modifies 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(Byte[]) |
Relative bulk put method (optional operation). |
Put(Byte[], Int32, Int32) |
Relative bulk put method (optional operation). |
Put(ByteBuffer) |
Relative bulk put method (optional operation). |
Put(Int32, SByte) |
Absolute put method (optional operation). |
Put(SByte) |
Relative put method (optional operation). |
PutChar(Char) |
Relative put method for writing a char value (optional operation). |
PutChar(Int32, Char) |
Absolute put method for writing a char value (optional operation). |
PutDouble(Double) |
Relative put method for writing a double value (optional operation). |
PutDouble(Int32, Double) |
Absolute put method for writing a double value (optional operation). |
PutFloat(Int32, Single) |
Absolute put method for writing a float value (optional operation). |
PutFloat(Single) |
Relative put method for writing a float value (optional operation). |
PutInt(Int32) |
Relative put method for writing an int value (optional operation). |
PutInt(Int32, Int32) |
Absolute put method for writing an int value (optional operation). |
PutLong(Int32, Int64) |
Absolute put method for writing a long value (optional operation). |
PutLong(Int64) |
Relative put method for writing a long value (optional operation). |
PutShort(Int16) |
Relative put method for writing a short value (optional operation). |
PutShort(Int32, Int16) |
Absolute put method for writing a short value (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 byte buffer whose content is a shared subsequence of this buffer's content. |
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 another thread invokes the
|
Wait(Int64) |
Causes the current thread to wait until either another thread invokes the
|
Wait(Int64, Int32) |
Causes the current thread to wait until another thread invokes the
|
Wrap(Byte[]) |
Wraps a byte array into a buffer. |
Wrap(Byte[], Int32, Int32) |
Wraps a byte 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) |