FileDocCategorySizeDatePackage
BluetoothPbapVcardList.javaAPI DocAndroid 5.1 API2568Thu Mar 12 22:22:50 GMT 2015android.bluetooth.client.pbap

BluetoothPbapVcardList

public class BluetoothPbapVcardList extends Object

Fields Summary
private final ArrayList
mCards
Constructors Summary
public BluetoothPbapVcardList(InputStream in, byte format)

        parse(in, format);
    
Methods Summary
public intgetCount()

        return mCards.size();
    
public com.android.vcard.VCardEntrygetFirst()

        return mCards.get(0);
    
public java.util.ArrayListgetList()

        return mCards;
    
private voidparse(java.io.InputStream in, byte format)

        VCardParser parser;

        if (format == BluetoothPbapClient.VCARD_TYPE_30) {
            parser = new VCardParser_V30();
        } else {
            parser = new VCardParser_V21();
        }

        VCardEntryConstructor constructor = new VCardEntryConstructor();
        VCardEntryCounter counter = new VCardEntryCounter();
        CardEntryHandler handler = new CardEntryHandler();

        constructor.addEntryHandler(handler);

        parser.addInterpreter(constructor);
        parser.addInterpreter(counter);

        try {
            parser.parse(in);
        } catch (VCardException e) {
            e.printStackTrace();
        }