if (isClasspathResource(path)) {
String classpathResourcePath = ResourceUtils.getClasspathResourcePath(path);
is = ResourceUtils.class.getResourceAsStream(classpathResourcePath);
if (is == null) {
throw new RuntimeIOException("Certificate stream is null: '" + classpathResourcePath + "'");
}
} else {
try {
is = new BufferedInputStream(new FileInputStream(path));
} catch (FileNotFoundException e) {
throw new RuntimeIOException(e);
}
}
return is;
}