diff --git a/core/java/android/database/Cursor.java b/core/java/android/database/Cursor.java index a344272e1bb6b..a9a71cfb5a4b8 100644 --- a/core/java/android/database/Cursor.java +++ b/core/java/android/database/Cursor.java @@ -212,7 +212,9 @@ public interface Cursor { /** * Returns the value of the requested column as a byte array. * - *

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

The result and whether this method throws an exception when the + * column value is null or the column type is not a blob type is + * implementation-defined. * * @param columnIndex the zero-based index of the target column. * @return the value of that column as a byte array. @@ -222,8 +224,9 @@ public interface Cursor { /** * 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). + *

The result and whether this method throws an exception when the + * column value is null or the column type is not a string type is + * implementation-defined. * * @param columnIndex the zero-based index of the target column. * @return the value of that column as a String. @@ -243,8 +246,10 @@ public interface Cursor { /** * 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). + *

The result and whether this method throws an exception when the + * column value is null, the column type is not an integral type, or the + * integer value is outside the range [Short.MIN_VALUE, + * Short.MAX_VALUE] is implementation-defined. * * @param columnIndex the zero-based index of the target column. * @return the value of that column as a short. @@ -254,8 +259,10 @@ public interface Cursor { /** * 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). + *

The result and whether this method throws an exception when the + * column value is null, the column type is not an integral type, or the + * integer value is outside the range [Integer.MIN_VALUE, + * Integer.MAX_VALUE] is implementation-defined. * * @param columnIndex the zero-based index of the target column. * @return the value of that column as an int. @@ -265,8 +272,10 @@ public interface Cursor { /** * 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). + *

The result and whether this method throws an exception when the + * column value is null, the column type is not an integral type, or the + * integer value is outside the range [Long.MIN_VALUE, + * Long.MAX_VALUE] is implementation-defined. * * @param columnIndex the zero-based index of the target column. * @return the value of that column as a long. @@ -276,8 +285,10 @@ public interface Cursor { /** * 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). + *

The result and whether this method throws an exception when the + * column value is null, the column type is not a floating-point type, or the + * floating-point value is not representable as a float value is + * implementation-defined. * * @param columnIndex the zero-based index of the target column. * @return the value of that column as a float. @@ -287,8 +298,10 @@ public interface Cursor { /** * 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). + *

The result and whether this method throws an exception when the + * column value is null, the column type is not a floating-point type, or the + * floating-point value is not representable as a double value is + * implementation-defined. * * @param columnIndex the zero-based index of the target column. * @return the value of that column as a double. @@ -420,7 +433,8 @@ public interface Cursor { * that are required to fetch data for the cursor. * *

These values may only change when requery is called. - * @return cursor-defined values, or Bundle.EMTPY if there are no values. Never null. + * @return cursor-defined values, or {@link android.os.Bundle#EMPTY Bundle.EMPTY} if there + * are no values. Never null. */ Bundle getExtras(); @@ -430,8 +444,10 @@ public interface Cursor { * *

One use of this is to tell a cursor that it should retry its network request after it * reported an error. - * @param extras extra values, or Bundle.EMTPY. Never null. - * @return extra values, or Bundle.EMTPY. Never null. + * @param extras extra values, or {@link android.os.Bundle#EMPTY Bundle.EMPTY}. + * Never null. + * @return extra values, or {@link android.os.Bundle#EMPTY Bundle.EMPTY}. + * Never null. */ Bundle respond(Bundle extras); }