class CSVFilter extends ResourceFilter {

    @Override
    public LanguageBundle parse(InputStream inStream, FilterOptions options)
            throws IOException, ResourceFilterException {
        LanguageBundleBuilder bundleBuilder = new LanguageBundleBuilder(true);
        CSVParser parser = CSVParser.parse(inStream, StandardCharsets.UTF_8,
                CSVFormat.RFC4180.withHeader("key", "value").withSkipHeaderRecord(true));
        for (CSVRecord record : parser) {
            String key = record.get(0);
            String value = record.get(1);
            bundleBuilder.addResourceString(key, value);
        }
        return bundleBuilder.build();
    }

}