code: public FilterRuleChain<String> parse(BufferedReader reader, boolean defaultResult) throws IOException {
  
      try {
        int lineCount = 0;
        List<FilterRule<String>> rules = new ArrayList<>();
        String line = reader.readLine();
        while (line != null) {
          line = line.trim();
          if (line.length() > 0) {
            lineCount++;
            char first = line.charAt(0);
            if ((first == this.acceptChar) || (first == this.denyChar)) {
              String regex = line.substring(1);
              boolean accept = (first == this.acceptChar);
              FilterRule<String> rule = new PatternFilterRule(regex, accept);
              rules.add(rule);
            } else if (first == this.commentChar) {
              // ignore line
            } else {
              throw new IllegalArgumentException(
                  "Illegal start character '" + first + "' in line " + lineCount + "!");
            }
          }
          line = reader.readLine();
        }
        FilterRule<String>[] ruleArray = rules.toArray(new FilterRule[rules.size()]);
        return new FilterRuleChain<>(defaultResult, ruleArray);
      } finally {
        reader.close();
      }
    }
docs: This method parses the content of the given {@code reader} as {@link FilterRuleChain} as described
  {@link FilterRuleChainPlainParser above}.
  
  @param reader is where to read from. It will be closed at the end of this method (on success and in an exceptional
  state).
  @param defaultResult is the {@link FilterRuleChain#getDefaultResult() default-result} of the chain.
  @return the parsed configuration as filter-chain.
  @throws IOException if an I/O error occurred while parsing.