throw new IOException("Cannot load mod rewrite config file: " + modRewriteConfFile);
}
try {
String text = camelContext.getTypeConverter().mandatoryConvertTo(String.class, is);
ModRewriteConfLoader loader = new ModRewriteConfLoader();
conf = new Conf();
loader.process(text, conf);
} finally {
IOHelper.close(is);
}
} else if (modRewriteConfText != null) {
LOG.debug("Using modRewriteConfText: {} as config for urlRewrite", modRewriteConfText);
ModRewriteConfLoader loader = new ModRewriteConfLoader();
conf = new Conf();
loader.process(modRewriteConfText, conf);
} else if (configFile != null) {
LOG.debug("Using config file: {} as config for urlRewrite", configFile);
InputStream is = camelContext.getClassResolver().loadResourceAsStream(configFile);
if (is == null) {
throw new IOException("Cannot load config file: " + configFile);
}
try {
conf = new Conf(is, configFile);
} finally {
IOHelper.close(is);
}
}
if (conf != null) {