Examples of PublicSuffixList


Examples of org.apache.http.conn.util.PublicSuffixList

     *
     * @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());
    }
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixList

    @Before
    public void setUp() throws Exception {
        final ClassLoader classLoader = getClass().getClassLoader();
        final InputStream in = classLoader.getResourceAsStream(SOURCE_FILE);
        Assert.assertNotNull(in);
        final PublicSuffixList suffixList;
        try {
            final org.apache.http.conn.util.PublicSuffixListParser parser = new org.apache.http.conn.util.PublicSuffixListParser();
            suffixList = parser.parse(new InputStreamReader(in, Consts.UTF_8));
        } finally {
            in.close();
        }
        final PublicSuffixMatcher matcher = new PublicSuffixMatcher(suffixList.getRules(), suffixList.getExceptions());
        this.filter = new PublicSuffixDomainFilter(new RFC2109DomainHandler(), matcher);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.