Java 类android.content.EntityIterator 实例源码

项目:silent-contacts-android    文件:RawContactDeltaList.java   
/**
 * Create an {@link RawContactDeltaList} based on {@link Contacts} specified by the
 * given query parameters. This closes the {@link EntityIterator} when
 * finished, so it doesn't subscribe to updates.
 */
public static RawContactDeltaList fromQuery(Uri entityUri, ContentResolver resolver,
        String selection, String[] selectionArgs, String sortOrder) {

    final EntityIterator iterator = RawContacts.newEntityIterator(
            resolver.query(entityUri, null, selection, selectionArgs, sortOrder));
    try {
        return fromIterator(iterator);
    } 
    finally {
        iterator.close();
    }
}
项目:silent-contacts-android    文件:VCardComposer.java   
/**
 * @return a vCard string.
 */
public String createOneEntryWithIterator(EntityIterator ei) {
    String vCard = createOneEntryInternal(null, null, ei);
    if (!mCursor.moveToNext()) {
        Log.e(LOG_TAG, "Cursor#moveToNext() returned false");
    }
    return vCard;
}
项目:silent-contacts-android    文件:ScContactsContract.java   
/**
 * TODO: javadoc
 * 
 * @param cursor
 * @return
 */
public static EntityIterator newEntityIterator(Cursor cursor) {
    return new EntityIteratorImpl(cursor);
}