Sdílet prostřednictvím


CursorWindow.CopyStringToBuffer(Int32, Int32, CharArrayBuffer) Method

Definition

Copies the text of the field at the specified row and column index into a CharArrayBuffer.

[Android.Runtime.Register("copyStringToBuffer", "(IILandroid/database/CharArrayBuffer;)V", "GetCopyStringToBuffer_IILandroid_database_CharArrayBuffer_Handler")]
public virtual void CopyStringToBuffer (int row, int column, Android.Database.CharArrayBuffer? buffer);
[<Android.Runtime.Register("copyStringToBuffer", "(IILandroid/database/CharArrayBuffer;)V", "GetCopyStringToBuffer_IILandroid_database_CharArrayBuffer_Handler")>]
abstract member CopyStringToBuffer : int * int * Android.Database.CharArrayBuffer -> unit
override this.CopyStringToBuffer : int * int * Android.Database.CharArrayBuffer -> unit

Parameters

row
Int32

The zero-based row index.

column
Int32

The zero-based column index.

buffer
CharArrayBuffer

The CharArrayBuffer to hold the string. It is automatically resized if the requested string is larger than the buffer's current capacity.

Attributes

Remarks

Copies the text of the field at the specified row and column index into a CharArrayBuffer.

The buffer is populated as follows: <ul> <li>If the buffer is too small for the value to be copied, then it is automatically resized.</li> <li>If the field is of type Cursor#FIELD_TYPE_NULL, then the buffer is set to an empty string.</li> <li>If the field is of type Cursor#FIELD_TYPE_STRING, then the buffer is set to the contents of the string.</li> <li>If the field is of type Cursor#FIELD_TYPE_INTEGER, then the buffer is set to a string representation of the integer in decimal, obtained by formatting the value with the printf family of functions using format specifier %lld.</li> <li>If the field is of type Cursor#FIELD_TYPE_FLOAT, then the buffer is set to a string representation of the floating-point value in decimal, obtained by formatting the value with the printf family of functions using format specifier %g.</li> <li>If the field is of type Cursor#FIELD_TYPE_BLOB, then a SQLiteException is thrown.</li> </ul>

Java documentation for android.database.CursorWindow.copyStringToBuffer(int, int, android.database.CharArrayBuffer).

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