Android
android.database
public abstract class

android.database.AbstractWindowedCursor

java.lang.Object
android.database.AbstractCursor CrossProcessCursor
android.database.AbstractWindowedCursor

A base class for Cursors that store their data in CursorWindows.

Known Direct Subclasses

Summary

Fields

protected      CursorWindow  mWindow  This needs be updated in onMove(int, int) by subclasses, and needs to be set to NULL when the contents of the cursor change. 
Fields inherited from class android.database.AbstractCursor

Public Constructors

            AbstractWindowedCursor()

Public Methods

          void  copyStringToBuffer(int columnIndex, CharArrayBuffer buffer)
Retrieves the requested column text and stores it in the buffer provided.
          byte[]  getBlob(int columnIndex)
Returns the value of the requested column as a byte array.
          double  getDouble(int columnIndex)
Returns the value of the requested column as a double.
          float  getFloat(int columnIndex)
Returns the value of the requested column as a float.
          int  getInt(int columnIndex)
Returns the value of the requested column as an int.
          long  getLong(int columnIndex)
Returns the value of the requested column as a long.
          short  getShort(int columnIndex)
Returns the value of the requested column as a short.
          String  getString(int columnIndex)
Returns the value of the requested column as a String.
          CursorWindow  getWindow()
returns a pre-filled window, return NULL if no such window
          boolean  hasWindow()
          boolean  isBlob(int columnIndex)
          boolean  isNull(int columnIndex)
Returns true if the value in the indicated column is null.
          void  setWindow(CursorWindow window)
Set a new cursor window to cursor, usually set a remote cursor window

Protected Methods

          void  checkPosition()
This function throws CursorIndexOutOfBoundsException if the cursor position is out of bounds.
Methods inherited from class android.database.AbstractCursor
Methods inherited from class java.lang.Object
Methods inherited from interface android.database.CrossProcessCursor
Methods inherited from interface android.database.Cursor

Details

Fields

protected CursorWindow mWindow

This needs be updated in onMove(int, int) by subclasses, and needs to be set to NULL when the contents of the cursor change.

Public Constructors

public AbstractWindowedCursor()

Public Methods

public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer)

Retrieves the requested column text and stores it in the buffer provided. If the buffer size is not sufficient, a new char buffer will be allocated and assigned to CharArrayBuffer.data

public byte[] getBlob(int columnIndex)

Returns the value of the requested column as a byte array.

If the native content of that column is not blob exception may throw

public double getDouble(int columnIndex)

Returns the value of the requested column as a double.

If the native content of that column is not numeric the result will be the result of passing the column value to Double.valueOf(x).

public float getFloat(int columnIndex)

Returns the value of the requested column as a float.

If the native content of that column is not numeric the result will be the result of passing the column value to Float.valueOf(x).

public int getInt(int columnIndex)

Returns the value of the requested column as an int.

If the native content of that column is not numeric the result will be the result of passing the column value to Integer.valueOf(x).

public long getLong(int columnIndex)

Returns the value of the requested column as a long.

If the native content of that column is not numeric the result will be the result of passing the column value to Long.valueOf(x).

public short getShort(int columnIndex)

Returns the value of the requested column as a short.

If the native content of that column is not numeric the result will be the result of passing the column value to Short.valueOf(x).

public String getString(int columnIndex)

Returns the value of the requested column as a String.

If the native content of that column is not text the result will be the result of passing the column value to String.valueOf(x).

public CursorWindow getWindow()

returns a pre-filled window, return NULL if no such window

public boolean hasWindow()

public boolean isBlob(int columnIndex)

public boolean isNull(int columnIndex)

Returns true if the value in the indicated column is null.

public void setWindow(CursorWindow window)

Set a new cursor window to cursor, usually set a remote cursor window

Parameters

window cursor window

Protected Methods

protected void checkPosition()

This function throws CursorIndexOutOfBoundsException if the cursor position is out of bounds. Subclass implementations of the get functions should call this before attempting to retrieve data.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56