loader.parseInputStream(bufferedStream);
bufferedStream.close();
return loader.getConfiguration();
}
catch (FileNotFoundException e) {
throw new CheckstyleException(
"unable to find " + aConfig, e);
}
catch (ParserConfigurationException e) {
throw new CheckstyleException(
"unable to parse " + aConfig, e);
}
catch (SAXParseException e) {
throw new CheckstyleException("unable to parse "
+ aConfig + " - " + e.getMessage() + ":" + e.getLineNumber()
+ ":" + e.getColumnNumber(), e);
}
catch (SAXException e) {
throw new CheckstyleException("unable to parse "
+ aConfig + " - " + e.getMessage(), e);
}
catch (IOException e) {
throw new CheckstyleException("unable to read " + aConfig, e);
}
}