static String[] parseExtDirs(String codebase, int start) { String s = System.getProperty(EXTDIRS_PROPERTY); String globalPrefix = (start > 0 ? codebase.substring(0, start) : "file:"); int end = start + EXTDIRS_EXPANSION.length(); String globalSuffix = (end < codebase.length() ? codebase.substring(end) : (String) null); String[] dirs = null; String localSuffix; if (s != null) { StringTokenizer st = new StringTokenizer(s, File.pathSeparator); int count = st.countTokens(); dirs = new String[count]; for (int i = 0; i < count; i++) { File file = new File(st.nextToken()); dirs[i] = sun.net.www.ParseUtil.encodePath (file.getAbsolutePath()); if (!dirs[i].startsWith("/")) { dirs[i] = "/" + dirs[i]; } localSuffix = (globalSuffix == null ? (dirs[i].endsWith("/") ? "*" : "/*") : globalSuffix); dirs[i] = globalPrefix + dirs[i] + localSuffix; } } return dirs; }
static String[] parseExtDirs(String codebase, int start) { String s = System.getProperty(EXTDIRS_PROPERTY); String globalPrefix = (start > 0 ? codebase.substring(0, start) : "file:"); int end = start + EXTDIRS_EXPANSION.length(); String globalSuffix = (end < codebase.length() ? codebase.substring(end) : (String) null); String[] dirs = null; String localSuffix; if (s != null) { StringTokenizer st = new StringTokenizer(s, File.pathSeparator); int count = st.countTokens(); dirs = new String[count]; for (int i = 0; i < count; i++) { File file = new File(st.nextToken()); dirs[i] = sun.net.www.ParseUtil.encodePath (file.getAbsolutePath()); if (!dirs[i].startsWith("/")) { dirs[i] = "/" + dirs[i]; } localSuffix = (globalSuffix == null ? (dirs[i].endsWith("/") ? "*" : "/*") : globalSuffix); dirs[i] = globalPrefix + dirs[i] + localSuffix; } } return dirs; }