I was trying to find out some information about loading the vCalendar files by PIM API, but there is so less resources about this issues.
So: I tried to load the vCalendar file into the MIDlet by PIM API (source follows), but I always get an PIMException "Failed to parse data! Input does not start with BEGIN tag". But it starts!

Can anybody help me to load the vCalendar into PIM classes?



HttpConnection conn = null;
InputStream is = null;

try {
  // Fetch teh remote content to a byte array "buf"
  conn = (HttpConnection) Connector.open(url);
  is = conn.openInputStream();
  PIMItem[] items = PIM.getInstance().fromSerialFormat(is,"UTF-8");
  for (int i = 0; i < items.length; i++) {
    Event ev = (Event)items[i];
    //do something with ev
} catch (PIMException pe) {
  //do something
} catch (Exception e) {
 //do something