Remove a MIDlet suite.
try {
MIDletSuiteStorage storage =
MIDletSuiteStorage.getMIDletSuiteStorage();
int[] suiteIds = storage.getListOfSuites();
if (suiteIds.length == 0) {
System.out.println("No suites installed.");
notifyDestroyed();
return;
}
for (int i = 0; i < suiteIds.length; i++) {
MIDletSuite suite = storage.getMIDletSuite(suiteIds[i], false);
String value;
System.out.println("Suite: " + suiteIds[i]);
value = suite.getProperty("MIDlet-Name");
System.out.println(" Name: " + value);
value = suite.getProperty("MIDlet-Version");
System.out.println(" Version: " + value);
value = suite.getProperty("MIDlet-Vendor");
System.out.println(" Vendor: " + value);
value = suite.getProperty("MIDlet-Description");
if (value != null) {
System.out.println(" Description: " + value);
}
for (int j = 1; ; j++) {
value = suite.getProperty("MIDlet-" + j);
if (value == null) {
break;
}
if (j == 1) {
System.out.println(" MIDlets:");
}
MIDletInfo midlet = new MIDletInfo(value);
System.out.println(" " + midlet.name +
": " + midlet.classname);
}
}
} catch (MIDletSuiteLockedException msle) {
System.err.println("Error: MIDlet suite is locked");
} catch (Throwable t) {
System.err.println("Error listing suites.");
t.printStackTrace();
}
notifyDestroyed();