private static InputStream findInputStream(String fileName, ClassLoader cl) throws FileNotFoundException {
if (fileName == null)
throw new NullPointerException("File name cannot be null!");
FileLookup fileLookup = FileLookupFactory.newInstance();
InputStream is = fileLookup.lookupFile(fileName, cl);
if (is == null)
throw new FileNotFoundException("File " + fileName
+ " could not be found, either on the classpath or on the file system!");
return is;
}