use of org.mycore.common.content.MCRURLContent in project mycore by MyCoRe-Org.
the class MCRConfigurationInputStream method getPropertyStream.
private static InputStream getPropertyStream(String filename) throws IOException {
File mycoreProperties = new File(filename);
MCRContent input = null;
if (mycoreProperties.canRead()) {
input = new MCRFileContent(mycoreProperties);
} else {
URL url = MCRConfigurationInputStream.class.getClassLoader().getResource(filename);
if (url != null) {
input = new MCRURLContent(url);
}
}
return input == null ? null : input.getInputStream();
}
Aggregations