static protected void load(InputStream input) throws IOException { // check for platform-specific properties in the defaults String platformExt = "." + PConstants.platformNames[PApplet.platform]; int platformExtLength = platformExt.length(); HashMap plattable = new HashMap(); String[] lines = PApplet.loadStrings(input); // Reads as UTF-8 for (String line : lines) { if ((line.length() == 0) || (line.charAt(0) == '#')) continue; // this won't properly handle = signs being in the text int equals = line.indexOf('='); if (equals != -1) { String key = line.substring(0, equals).trim(); // check if this is a platform-specific key, and if so, shave things if (key.endsWith(platformExt)) { // this is a key specific to this platform key = key.substring(0, key.length() - platformExtLength); String value = line.substring(equals + 1).trim(); plattable.put(key, value); } else { String value = line.substring(equals + 1).trim(); table.put(key, value); } } } table.putAll(plattable); }