Sdílet prostřednictvím


CharBuffer.Append Method

Definition

Overloads

Append(ICharSequence)

Appends the specified character sequence to this buffer  (optional operation).

Append(Char)

Appends the specified char to this buffer  (optional operation).

Append(String)

Appends the specified character sequence to this buffer  (optional operation).

Append(ICharSequence, Int32, Int32)

Appends a subsequence of the specified character sequence to this buffer  (optional operation).

Append(String, Int32, Int32)

Appends a subsequence of the specified character sequence to this buffer  (optional operation).

Append(ICharSequence)

Appends the specified character sequence to this buffer  (optional operation).

[Android.Runtime.Register("append", "(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;", "GetAppend_Ljava_lang_CharSequence_Handler")]
public virtual Java.Nio.CharBuffer? Append (Java.Lang.ICharSequence? csq);
[<Android.Runtime.Register("append", "(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;", "GetAppend_Ljava_lang_CharSequence_Handler")>]
abstract member Append : Java.Lang.ICharSequence -> Java.Nio.CharBuffer
override this.Append : Java.Lang.ICharSequence -> Java.Nio.CharBuffer

Parameters

csq
ICharSequence

The character sequence to append. If csq is null, then the four characters "null" are appended to this character buffer.

Returns

This buffer

Attributes

Exceptions

if remaining() is less than the length of csq.

if no changes may be made to the contents of this buffer.

Remarks

Appends the specified character sequence to this buffer&nbsp;&nbsp;(optional operation).

An invocation of this method of the form dst.append(csq) behaves in exactly the same way as the invocation

dst.put(csq.toString())

Depending on the specification of toString for the character sequence csq, the entire sequence may not be appended. For instance, invoking the CharBuffer#toString() toString method of a character buffer will return a subsequence whose content depends upon the buffer's position and limit.

Added in 1.5.

Java documentation for java.nio.CharBuffer.append(java.lang.CharSequence).

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.

Applies to

Append(Char)

Appends the specified char to this buffer&nbsp;&nbsp;(optional operation).

[Android.Runtime.Register("append", "(C)Ljava/nio/CharBuffer;", "GetAppend_CHandler")]
public virtual Java.Nio.CharBuffer? Append (char c);
[<Android.Runtime.Register("append", "(C)Ljava/nio/CharBuffer;", "GetAppend_CHandler")>]
abstract member Append : char -> Java.Nio.CharBuffer
override this.Append : char -> Java.Nio.CharBuffer

Parameters

c
Char

The 16-bit char to append

Returns

This buffer

Attributes

Exceptions

if position is equal or greater than limit.

if no changes may be made to the contents of this buffer.

Remarks

Appends the specified char to this buffer&nbsp;&nbsp;(optional operation).

An invocation of this method of the form dst.append(c) behaves in exactly the same way as the invocation

dst.put(c)

Added in 1.5.

Java documentation for java.nio.CharBuffer.append(char).

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.

Applies to

Append(String)

Appends the specified character sequence to this buffer&nbsp;&nbsp;(optional operation).

public Java.Nio.CharBuffer? Append (string? csq);
member this.Append : string -> Java.Nio.CharBuffer

Parameters

csq
String

The character sequence to append. If csq is null, then the four characters "null" are appended to this character buffer.

Returns

This buffer

Remarks

Appends the specified character sequence to this buffer&nbsp;&nbsp;(optional operation).

An invocation of this method of the form dst.append(csq) behaves in exactly the same way as the invocation

dst.put(csq.toString())

Depending on the specification of toString for the character sequence csq, the entire sequence may not be appended. For instance, invoking the CharBuffer#toString() toString method of a character buffer will return a subsequence whose content depends upon the buffer's position and limit.

Added in 1.5.

Java documentation for java.nio.CharBuffer.append(java.lang.CharSequence).

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.

Applies to

Append(ICharSequence, Int32, Int32)

Appends a subsequence of the specified character sequence to this buffer&nbsp;&nbsp;(optional operation).

[Android.Runtime.Register("append", "(Ljava/lang/CharSequence;II)Ljava/nio/CharBuffer;", "GetAppend_Ljava_lang_CharSequence_IIHandler")]
public virtual Java.Nio.CharBuffer? Append (Java.Lang.ICharSequence? csq, int start, int end);
[<Android.Runtime.Register("append", "(Ljava/lang/CharSequence;II)Ljava/nio/CharBuffer;", "GetAppend_Ljava_lang_CharSequence_IIHandler")>]
abstract member Append : Java.Lang.ICharSequence * int * int -> Java.Nio.CharBuffer
override this.Append : Java.Lang.ICharSequence * int * int -> Java.Nio.CharBuffer

Parameters

csq
ICharSequence

The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".

start
Int32

the first char to write, must not be negative and not greater than csq.length().

end
Int32

the last char to write (excluding), must be less than start and not greater than csq.length().

Returns

This buffer

Attributes

Exceptions

if remaining() is less than end - start.

if either start or end is invalid.

if no changes may be made to the contents of this buffer.

Remarks

Appends a subsequence of the specified character sequence to this buffer&nbsp;&nbsp;(optional operation).

An invocation of this method of the form dst.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

dst.put(csq.subSequence(start, end).toString())

Added in 1.5.

Java documentation for java.nio.CharBuffer.append(java.lang.CharSequence, int, int).

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.

Applies to

Append(String, Int32, Int32)

Appends a subsequence of the specified character sequence to this buffer&nbsp;&nbsp;(optional operation).

public Java.Nio.CharBuffer? Append (string? csq, int start, int end);
member this.Append : string * int * int -> Java.Nio.CharBuffer

Parameters

csq
String

The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".

start
Int32
end
Int32

Returns

This buffer

Remarks

Appends a subsequence of the specified character sequence to this buffer&nbsp;&nbsp;(optional operation).

An invocation of this method of the form dst.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

dst.put(csq.subSequence(start, end).toString())

Added in 1.5.

Java documentation for java.nio.CharBuffer.append(java.lang.CharSequence, int, int).

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.

Applies to