ContentValues怎么用的?
来源:互联网 发布:loop算法讲解 编辑:程序博客网 时间:2024/04/27 13:42
一般使用ContentValues
ContentValues contentValues = new ContentValues();<p class="p1">contentValues.put(key, value);</p><p class="p1">context.getContentResolver().insert(url, contentValues);//其中url是Uri类型的</p>
挺好奇的,就看了一下ContentValues源码,本来想着应该是个键值对神马的,hashmap之类的,结果。。
源码中的ContentValues看着挺奇怪的
package android.content;public final class ContentValues implements android.os.Parcelable{public ContentValues() { throw new RuntimeException("Stub!"); }public ContentValues(int size) { throw new RuntimeException("Stub!"); }public ContentValues(android.content.ContentValues from) { throw new RuntimeException("Stub!"); }public boolean equals(java.lang.Object object) { throw new RuntimeException("Stub!"); }public int hashCode() { throw new RuntimeException("Stub!"); }<span style="color:#ff0000;">public void put(java.lang.String key, java.lang.String value) { throw new RuntimeException("Stub!"); }</span>public void putAll(android.content.ContentValues other) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, java.lang.Byte value) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, java.lang.Short value) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, java.lang.Integer value) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, java.lang.Long value) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, java.lang.Float value) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, java.lang.Double value) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, java.lang.Boolean value) { throw new RuntimeException("Stub!"); }public void put(java.lang.String key, byte[] value) { throw new RuntimeException("Stub!"); }public void putNull(java.lang.String key) { throw new RuntimeException("Stub!"); }public int size() { throw new RuntimeException("Stub!"); }public void remove(java.lang.String key) { throw new RuntimeException("Stub!"); }public void clear() { throw new RuntimeException("Stub!"); }public boolean containsKey(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Object get(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.String getAsString(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Long getAsLong(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Integer getAsInteger(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Short getAsShort(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Byte getAsByte(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Double getAsDouble(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Float getAsFloat(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.lang.Boolean getAsBoolean(java.lang.String key) { throw new RuntimeException("Stub!"); }public byte[] getAsByteArray(java.lang.String key) { throw new RuntimeException("Stub!"); }public java.util.Set<java.util.Map.Entry<java.lang.String, java.lang.Object>> valueSet() { throw new RuntimeException("Stub!"); }public java.util.Set<java.lang.String> keySet() { throw new RuntimeException("Stub!"); }public int describeContents() { throw new RuntimeException("Stub!"); }@java.lang.SuppressWarnings(value={"deprecation"})public void writeToParcel(android.os.Parcel parcel, int flags) { throw new RuntimeException("Stub!"); }public java.lang.String toString() { throw new RuntimeException("Stub!"); }public static final java.lang.String TAG = "ContentValues";public static final android.os.Parcelable.Creator<android.content.ContentValues> CREATOR;static { CREATOR = null; }}
0 0
- ContentValues怎么用的?
- ContentValues 的使用
- ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- ContentValues的用法
- 【Android】ContentValues的用法
- ContentValues的用法
- ContentValues的使用
- 【Android】ContentValues的用法
- ContentValues的用法
- 【Android】ContentValues的用法
- Android ContentValues的用法
- ContentValues
- ContentValues
- ContentValues
- 菜单项下添加子菜单
- 取余运算
- poj 3280
- Linux系统下USB摄像头驱动开发
- Android 禁用/启用移动数据的实现
- ContentValues怎么用的?
- java闭包
- adr和ldr的区别
- 微管理—给你一个技术团队,你该怎么管
- 多校联合——Stupid Tower Defense
- js的继承问题
- Spring+Quartz中的cron表达式
- HDU1257:最少拦截系统(LIS)
- MYSQL用法(九) 索引用法