Methods Summary |
---|
protected void | checkPosition()
super.checkPosition();
if (mWindow == null) {
throw new StaleDataException("Attempting to access a closed CursorWindow." +
"Most probable cause: cursor is deactivated prior to calling this method.");
}
|
protected void | clearOrCreateWindow(java.lang.String name)If there is a window, clear it.
Otherwise, creates a new window.
if (mWindow == null) {
mWindow = new CursorWindow(name);
} else {
mWindow.clear();
}
|
protected void | closeWindow()Closes the cursor window and sets {@link #mWindow} to null.
if (mWindow != null) {
mWindow.close();
mWindow = null;
}
|
public void | copyStringToBuffer(int columnIndex, CharArrayBuffer buffer)
checkPosition();
mWindow.copyStringToBuffer(mPos, columnIndex, buffer);
|
public byte[] | getBlob(int columnIndex)
checkPosition();
return mWindow.getBlob(mPos, columnIndex);
|
public double | getDouble(int columnIndex)
checkPosition();
return mWindow.getDouble(mPos, columnIndex);
|
public float | getFloat(int columnIndex)
checkPosition();
return mWindow.getFloat(mPos, columnIndex);
|
public int | getInt(int columnIndex)
checkPosition();
return mWindow.getInt(mPos, columnIndex);
|
public long | getLong(int columnIndex)
checkPosition();
return mWindow.getLong(mPos, columnIndex);
|
public short | getShort(int columnIndex)
checkPosition();
return mWindow.getShort(mPos, columnIndex);
|
public java.lang.String | getString(int columnIndex)
checkPosition();
return mWindow.getString(mPos, columnIndex);
|
public int | getType(int columnIndex)
checkPosition();
return mWindow.getType(mPos, columnIndex);
|
public CursorWindow | getWindow()
return mWindow;
|
public boolean | hasWindow()Returns true if the cursor has an associated cursor window.
return mWindow != null;
|
public boolean | isBlob(int columnIndex)
return getType(columnIndex) == Cursor.FIELD_TYPE_BLOB;
|
public boolean | isFloat(int columnIndex)
return getType(columnIndex) == Cursor.FIELD_TYPE_FLOAT;
|
public boolean | isLong(int columnIndex)
return getType(columnIndex) == Cursor.FIELD_TYPE_INTEGER;
|
public boolean | isNull(int columnIndex)
checkPosition();
return mWindow.getType(mPos, columnIndex) == Cursor.FIELD_TYPE_NULL;
|
public boolean | isString(int columnIndex)
return getType(columnIndex) == Cursor.FIELD_TYPE_STRING;
|
protected void | onDeactivateOrClose()
super.onDeactivateOrClose();
closeWindow();
|
public void | setWindow(CursorWindow window)Sets a new cursor window for the cursor to use.
The cursor takes ownership of the provided cursor window; the cursor window
will be closed when the cursor is closed or when the cursor adopts a new
cursor window.
If the cursor previously had a cursor window, then it is closed when the
new cursor window is assigned.
if (window != mWindow) {
closeWindow();
mWindow = window;
}
|