class ClasspathResourceResolver implements ResourceResolver {

    @Override
    public Reader reader(String name) {

        URL resource = ClasspathResourceResolver.class.getClassLoader().getResource(name);
        if (resource == null) {
            throw new LmRuntimeException("Extractor config not found in classpath: " + name);
        }

        try {
            return new InputStreamReader(resource.openStream(), StandardCharsets.UTF_8);
        } catch (IOException e) {
            throw new LmRuntimeException("Error reading classpath extractor config XML", e);
        }
    }

}