Motorola E680 - Smartphone - GSM Developer's Manual page 64

Micro edition (j2me) applications
Hide thumbs Also See for E680 - Smartphone - GSM:
Table of Contents

Advertisement

int speedNo = 1;
boolean res = PhoneBookRecord.isPrimary(speedNo);
Sample of code for calling of 'fromVFormat(InputStream in, int device)' method:
buffer = new String("BEGIN:VCARD\r\nN:;" + new String(name)
+
"\r\nTEL;TYPE=WORK:1\r\nEND:VCARD\r\n");
int num =
PhoneBookRecord.fromVFormat((InputStream)(new
ByteArrayInputStream(buffer.getBytes())),
PhoneBookRecord.PHONE_MEMORY);
Sample of code for calling of 'toVFormat(OutputStream out,
int index, int outFormat, int sortOrder)' method:
int index = 1;
ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
PhoneBookRecord.toVFormat(outStream, index,
PhoneBookRecord.VCARD_3_0,
PhoneBookRecord.SORT_BY_NAME);
System.out.println("***** Contents of the output stream:
*****");
System.out.print(new String(outStream.toByteArray()));
64

Advertisement

Table of Contents
loading

Table of Contents