class PatternExtractor {

    public List<ReplacingPattern> getPatternsFromFileList(String filepar) throws MailetException, IOException {
        ImmutableList.Builder<ReplacingPattern> patternList = ImmutableList.builder();
        for (String file : Splitter.on(",").split(filepar)) {
            FileNameWithCharset fileNameWithCharset = FileNameWithCharset.from(file);
            Optional<? extends InputStream> inputStream = retrieveInputStream(fileNameWithCharset.getFileName());
            if (inputStream.isPresent()) {
                patternList.addAll(getPatternsFromStream(inputStream.get(), fileNameWithCharset.getCharset()));
            }
        }
        return patternList.build();
    }

}