core/src/main/java/com/digitalpebble/stormcrawler/filtering/regex/RegexURLNormalizer.java
private List<Rule> readRules(String rulesFile) {
        try {
            InputStream regexStream = getClass().getClassLoader()
                    .getResourceAsStream(rulesFile);
            Reader reader = new InputStreamReader(regexStream,
                    StandardCharsets.UTF_8);
            return readConfiguration(reader);
        } catch (Exception e) {
            LOG.error("Error loading rules from file: {}", e);
            return EMPTY_RULES;
        }
    }
private List<Rule> readRules(String rulesFile) {
        try {
            InputStream regexStream = getClass().getClassLoader()
                    .getResourceAsStream(rulesFile);
            Reader reader = new InputStreamReader(regexStream,
                    StandardCharsets.UTF_8);
            return readConfiguration(reader);
        } catch (Exception e) {
            LOG.error("Error loading rules from file: {}", e);
            return EMPTY_RULES;
        }
    }
private List < Rule > readRules ( String rulesFile ) { try { InputStream regexStream = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( rulesFile ) ; Reader reader = new InputStreamReader ( regexStream , StandardCharsets . UTF_8 ) ; return readConfiguration ( reader ) ; } catch ( Exception e ) { LOG . error ( "Error loading rules from file: {}" , e ) ; return EMPTY_RULES ; } }
Reads the configuration file and populates a List of Rules.
Reads the configuration file and populates a List of Rules .