diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-11-02 14:18:07 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-02 14:18:07 -0700 |
commit | c91e46730d14611fb85cd7b2d3e51dac5ce538a2 (patch) | |
tree | b12b64b8dc41d8dffd0927bec44c16d2ab8c1871 /core | |
parent | 0b5d57ab7ea062af4502be5af2d51883d251c0bc (diff) | |
parent | bbd212d77852be155a815a0d2ad1da0df2c0dfe1 (diff) | |
download | frameworks_base-c91e46730d14611fb85cd7b2d3e51dac5ce538a2.zip frameworks_base-c91e46730d14611fb85cd7b2d3e51dac5ce538a2.tar.gz frameworks_base-c91e46730d14611fb85cd7b2d3e51dac5ce538a2.tar.bz2 |
am bbd212d7: Merge "Document per-implementation behaviors of native get* methods"
* commit 'bbd212d77852be155a815a0d2ad1da0df2c0dfe1':
Document per-implementation behaviors of native get* methods
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/database/CursorWindow.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/core/java/android/database/CursorWindow.java b/core/java/android/database/CursorWindow.java index c756825..76b91f5 100644 --- a/core/java/android/database/CursorWindow.java +++ b/core/java/android/database/CursorWindow.java @@ -245,6 +245,15 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { } } + /** + * Returns the value at (<code>row</code>, <code>col</code>) as a <code>byte</code> array. + * + * <p>If the value is null, then <code>null</code> is returned. If the + * type of column <code>col</code> is a string type, then the result + * is the array of bytes that make up the internal representation of the + * string value. If the type of column <code>col</code> is integral or floating-point, + * then an {@link SQLiteException} is thrown. + */ private native byte[] getBlob_native(int row, int col); /** @@ -332,6 +341,19 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { } } + /** + * Returns the value at (<code>row</code>, <code>col</code>) as a <code>String</code>. + * + * <p>If the value is null, then <code>null</code> is returned. If the + * type of column <code>col</code> is integral, then the result is the string + * that is obtained by formatting the integer value with the <code>printf</code> + * family of functions using format specifier <code>%lld</code>. If the + * type of column <code>col</code> is floating-point, then the result is the string + * that is obtained by formatting the floating-point value with the + * <code>printf</code> family of functions using format specifier <code>%g</code>. + * If the type of column <code>col</code> is a blob type, then an + * {@link SQLiteException} is thrown. + */ private native String getString_native(int row, int col); /** @@ -383,6 +405,17 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { } } + /** + * Returns the value at (<code>row</code>, <code>col</code>) as a <code>long</code>. + * + * <p>If the value is null, then <code>0L</code> is returned. If the + * type of column <code>col</code> is a string type, then the result + * is the <code>long</code> that is obtained by parsing the string value with + * <code>strtoll</code>. If the type of column <code>col</code> is + * floating-point, then the result is the floating-point value casted to a <code>long</code>. + * If the type of column <code>col</code> is a blob type, then an + * {@link SQLiteException} is thrown. + */ private native long getLong_native(int row, int col); /** @@ -402,6 +435,17 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { } } + /** + * Returns the value at (<code>row</code>, <code>col</code>) as a <code>double</code>. + * + * <p>If the value is null, then <code>0.0</code> is returned. If the + * type of column <code>col</code> is a string type, then the result + * is the <code>double</code> that is obtained by parsing the string value with + * <code>strtod</code>. If the type of column <code>col</code> is + * integral, then the result is the integer value casted to a <code>double</code>. + * If the type of column <code>col</code> is a blob type, then an + * {@link SQLiteException} is thrown. + */ private native double getDouble_native(int row, int col); /** |