Examples of FavIconSaxParser


Examples of com.googlecode.memwords.facade.cards.parser.FavIconSaxParser

@Singleton
public class FavIconFinderImpl implements FavIconFinder {

    @Override
    public String findFavIcon(InputSource source, URL baseUrl) throws FavIconException {
        FavIconSaxParser parser = new FavIconSaxParser();
        try {
            // workaround for Java bug #4666701
            if ("".equals(baseUrl.getFile()))  {
                baseUrl = new URL(baseUrl.toString() + "/");
            }
            URI uri = baseUrl.toURI();
            String potentiallyRelativeUrl = parser.findFavIcon(source);
            if (potentiallyRelativeUrl == null) {
                return null;
            }
            return uri.resolve(potentiallyRelativeUrl).toString();
        }
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.