Methods Summary |
---|
public void | addBinary(int field, int attributes, byte[] value, int offset, int length)Adds a binary value to the current Contact.
super.addBinary(field, attributes, value, offset, length);
if (field == PUBLIC_KEY) {
// remove any values from PUBLIC_KEY_STRING
while (countValues(PUBLIC_KEY_STRING) > 0) {
removeValue(PUBLIC_KEY_STRING, 0);
}
}
|
public void | addString(int field, int attributes, java.lang.String value)Adds a string to the current Contact.
super.addString(field, attributes, value);
if (field == PUBLIC_KEY_STRING) {
// remove any values from PUBLIC_KEY
while (countValues(PUBLIC_KEY) > 0) {
removeValue(PUBLIC_KEY, 0);
}
}
|
PIMFormat | getEncodingFormat()Gets encoding format for this contact record.
return new VCard30Format();
|
public int | getPreferredIndex(int field)Gets preferred index for requested field.
int indices = countValues(field);
for (int i = 0; i < indices; i++) {
int attributes = getAttributes(field, i);
if ((attributes & ATTR_PREFERRED) != 0) {
return i;
}
}
return -1;
|
protected int | getRevisionField()Gets the revision field identifier.
return REVISION;
|
protected int | getUIDField()Gets the UID field identifier.
return UID;
|
static boolean | isValidPIMField(int field)Ensures valid field.
switch (field) {
case Contact.ADDR:
case Contact.BIRTHDAY:
case Contact.CLASS:
case Contact.EMAIL:
case Contact.FORMATTED_ADDR:
case Contact.FORMATTED_NAME:
case Contact.NAME:
case Contact.NICKNAME:
case Contact.NOTE:
case Contact.ORG:
case Contact.PHOTO:
case Contact.PHOTO_URL:
case Contact.PUBLIC_KEY:
case Contact.PUBLIC_KEY_STRING:
case Contact.REVISION:
case Contact.TEL:
case Contact.TITLE:
case Contact.UID:
case Contact.URL:
return true;
default:
return false;
}
|
protected java.lang.String | toDisplayableString()Converts the Contact to a printable format.
return "Contact[" + formatData() + "]";
|