/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }
/** * Locate the specific file. * Return the file path or uri (if a resource within an archive on the classpath) or throw FileNotFoundExcpetion. */ static String locateFile (String findFile, ClassLoader classLoader) throws FileNotFoundException { URL url; String fullPathName; if (findFile == null) throw new FileNotFoundException("locateFile: null file name"); String testAbsolutePath = new File(findFile).getAbsolutePath(); if(testAbsolutePath.equals(findFile)) { return testAbsolutePath; } if (findFile.startsWith(absolutePath)) return findFile.substring(absolutePath.length()); if ((fullPathName = locateByProperty(findFile)) != null) return fullPathName; if ((url = locateByResource(findFile, classLoader)) != null) return url.toString(); // no special decode handling any more. throw new FileNotFoundException("locateFile: file not found: " + findFile); }