void (TreeSet<? super String> result, final String category) { final InputStream stream = MimeTypeDictionary.class.getResourceAsStream("mimeTypes/" + category + ".csv"); String csv = ""; try { csv = stream != null ? FileUtil.loadTextAndClose(stream) : ""; } catch (IOException e) { Logger.getInstance(MimeTypeDictionary.class).error(e); } final String[] lines = StringUtil.splitByLines(csv); for (String line : lines) { if (Strings.areSameInstance(line, lines[0])) continue; final String[] split = line.split(","); if (split.length > 1) { result.add(!split[1].isEmpty() ? split[1] : withCategory(category, split[0])); } } }