CharBuffer CharBuffer Class

Definition

A buffer of chars.

[Android.Runtime.Register("java/nio/CharBuffer", ApiSince=1, DoNotGenerateAcw=true)]
public abstract class CharBuffer : Java.Nio.Buffer, IDisposable, Java.Lang.IAppendable, Java.Lang.ICharSequence, Java.Lang.IComparable, Java.Lang.IReadable, System.Collections.Generic.IEnumerable<char>
type CharBuffer = class
    inherit Buffer
    interface IAppendable
    interface IJavaObject
    interface IDisposable
    interface ICharSequence
    interface seq<char>
    interface IEnumerable
    interface IComparable
    interface IReadable
Inheritance
Attributes
Implements

Remarks

Android platform documentation

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

CharBuffer(IntPtr, JniHandleOwnership) CharBuffer(IntPtr, JniHandleOwnership)

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

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasArray HasArray

Returns true if array and arrayOffset won't throw.

HasRemaining HasRemaining

Indicates if there are elements remaining in this buffer, that is if position .

(Inherited from Buffer)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsDirect IsDirect

Returns true if this is a direct buffer.

(Inherited from Buffer)
IsReadOnly IsReadOnly

Indicates whether this buffer is read-only.

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

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

ThresholdType ThresholdType

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

Methods

Allocate(Int32) Allocate(Int32)

Creates a char buffer based on a newly allocated char array.

Append(Char) Append(Char)

Writes the given char to the current position and increases the position by 1.

Append(ICharSequence) Append(ICharSequence)

Writes all chars of the given character sequence csq to the current position of this buffer, and increases the position by the length of the csq.

Append(ICharSequence, Int32, Int32) Append(ICharSequence, Int32, Int32)

Writes chars of the given CharSequence to the current position of this buffer, and increases the position by the number of chars written.

Append(String) Append(String)
Append(String, Int32, Int32) Append(String, Int32, Int32)
ArrayOffset() ArrayOffset()

Returns the offset into the array returned by array of the first element of the buffer (optional operation).

AsReadOnlyBuffer() AsReadOnlyBuffer()

Returns a read-only buffer that shares its content with this buffer.

Capacity() Capacity()

Returns the capacity of this buffer.

(Inherited from Buffer)
CharAt(Int32) CharAt(Int32)

relative to the current position

Clear() Clear()

Clears this buffer.

(Inherited from Buffer)
Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
Compact() Compact()

Compacts this char buffer.

CompareTo(CharBuffer) CompareTo(CharBuffer)

Compare the remaining chars of this buffer to another char buffer's remaining chars.

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

Returns a duplicated buffer that shares its content with this buffer.

Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
Flip() Flip()

Flips this buffer.

(Inherited from Buffer)
Get() Get()

Returns the char at the current position and increases the position by 1.

Get(Char[]) Get(Char[])

Reads chars from the current position into the specified char array and increases the position by the number of chars read.

Get(Char[], Int32, Int32) Get(Char[], Int32, Int32)

Reads chars from the current position into the specified char array, starting from the specified offset, and increases the position by the number of chars read.

Get(Int32) Get(Int32)

Returns a char at the specified index; the position is not changed.

GetDirectBufferAddress() GetDirectBufferAddress() Inherited from Buffer
GetEnumerator() GetEnumerator()
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Length() Length()

Returns the number of remaining chars.

Limit() Limit()

Returns the limit of this buffer.

(Inherited from Buffer)
Limit(Int32) Limit(Int32)

Sets the limit of this buffer.

(Inherited from Buffer)
Mark() Mark()

Marks the current position, so that the position may return to this point later by calling reset().

(Inherited from Buffer)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
Order() Order()

Returns the byte order used by this buffer when converting chars from/to bytes.

Position() Position()

Returns the position of this buffer.

(Inherited from Buffer)
Position(Int32) Position(Int32)

Sets the position of this buffer.

(Inherited from Buffer)
Put(Char) Put(Char)

Writes the given char to the current position and increases the position by 1.

Put(CharBuffer) Put(CharBuffer)

Writes all the remaining chars of the src char buffer to this buffer's current position, and increases both buffers' position by the number of chars copied.

Put(Char[]) Put(Char[])

Writes chars from the given char array to the current position and increases the position by the number of chars written.

Put(Char[], Int32, Int32) Put(Char[], Int32, Int32)

Writes chars from the given char array, starting from the specified offset, to the current position and increases the position by the number of chars written.

Put(Int32, Char) Put(Int32, Char)

Writes a char to the specified index of this buffer; the position is not changed.

Put(String) Put(String)

Writes all chars of the given string to the current position of this buffer, and increases the position by the length of string.

Put(String, Int32, Int32) Put(String, Int32, Int32)

Writes chars of the given string to the current position of this buffer, and increases the position by the number of chars written.

Read(CharBuffer) Read(CharBuffer)

Reads characters from this buffer and puts them into target.

Remaining() Remaining()

Returns the number of remaining elements in this buffer, that is limit - position.

(Inherited from Buffer)
Reset() Reset()

Resets the position of this buffer to the mark.

(Inherited from Buffer)
Rewind() Rewind()

Rewinds this buffer.

(Inherited from Buffer)
SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
Slice() Slice()

Returns a sliced buffer that shares its content with this buffer.

SubSequence(Int32, Int32) SubSequence(Int32, Int32)
SubSequenceFormatted(Int32, Int32) SubSequenceFormatted(Int32, Int32)

Returns a new char buffer representing a sub-sequence of this buffer's current remaining content.

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

Returns a string containing a concise, human-readable description of this object.

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

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wrap(Char[]) Wrap(Char[])

Creates a new char buffer by wrapping the given char array.

Wrap(Char[], Int32, Int32) Wrap(Char[], Int32, Int32)

Creates a new char buffer by wrapping the given char array.

Wrap(ICharSequence) Wrap(ICharSequence)

Creates a new char buffer by wrapping the given char sequence.

Wrap(ICharSequence, Int32, Int32) Wrap(ICharSequence, Int32, Int32)

Creates a new char buffer by wrapping the given char sequence.

Wrap(String) Wrap(String)
Wrap(String, Int32, Int32) Wrap(String, Int32, Int32)

Explicit Interface Implementations

IAppendable.Append(Char) IAppendable.Append(Char)
IAppendable.Append(ICharSequence) IAppendable.Append(ICharSequence)
IAppendable.Append(ICharSequence, Int32, Int32) IAppendable.Append(ICharSequence, Int32, Int32)
IComparable.CompareTo(Object) IComparable.CompareTo(Object)
IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()
IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)
Append(IAppendable, String) Append(IAppendable, String)
Append(IAppendable, String, Int32, Int32) Append(IAppendable, String, Int32, Int32)
SubSequence(ICharSequence, Int32, Int32) SubSequence(ICharSequence, Int32, Int32)

Applies to