public static String[] getPortIdentifiers()
	{
		String ports = null;
		try {
			ports = System.getProperty("microedition.commports");
		}
		catch (final SecurityException e) {}
		if (ports != null) {
			final StringTokenizer st = new StringTokenizer(ports, ",");
			final String[] portIds = new String[st.countTokens()];
			for (int i = 0; i < portIds.length; ++i)
				portIds[i] = st.nextToken();
			return portIds;
		}
		if (SerialComAdapter.isAvailable()) {
			final String[] prefixes = defaultPortPrefixes();
			final List l = new ArrayList(10);
			for (int k = 0; k < prefixes.length; k++) {
				final String prefix = prefixes[k];
				for (int i = 0; i < 10; ++i)
					if (SerialComAdapter.portExists(prefix + i))
						l.add(prefix + i);
			}
			return (String[]) l.toArray(new String[l.size()]);
		}
		// skip other possible adapters for now, and return empty list...
		return new String[0];
	}