try { in = new FileInputStream(geoFile); PublicSuffixList list2 = new PublicSuffixListParser().parse( new InputStreamReader(in, "UTF-8")); list = merge(list, list2);
/** * Parses the public suffix list format. * When creating the reader from the file, make sure to * use the correct encoding (the original list is in UTF-8). * * @param reader the suffix list. The caller is responsible for closing the reader. * @throws IOException on error while reading from list */ public void parse(final Reader reader) throws IOException { final PublicSuffixList suffixList = parser.parse(reader); filter.setPublicSuffixes(suffixList.getRules()); filter.setExceptions(suffixList.getExceptions()); }
/** * Parses the public suffix list format. * When creating the reader from the file, make sure to * use the correct encoding (the original list is in UTF-8). * * @param reader the suffix list. The caller is responsible for closing the reader. * @throws IOException on error while reading from list */ public void parse(final Reader reader) throws IOException { final PublicSuffixList suffixList = parser.parse(reader); filter.setPublicSuffixes(suffixList.getRules()); filter.setExceptions(suffixList.getExceptions()); }
/** * Parses the public suffix list format. * When creating the reader from the file, make sure to * use the correct encoding (the original list is in UTF-8). * * @param reader the suffix list. The caller is responsible for closing the reader. * @throws IOException on error while reading from list */ public void parse(final Reader reader) throws IOException { final PublicSuffixList suffixList = parser.parse(reader); filter.setPublicSuffixes(suffixList.getRules()); filter.setExceptions(suffixList.getExceptions()); }