Package com.flaptor.util.parser

Examples of com.flaptor.util.parser.IParser


        return "text/html";
    }
   
    private IParser getParser() {
        final int HTML = 1, PDF = 2;
        IParser parser = null;
        int docType = 0;
        String mimetype = header.get("content-type");
        if ("text/html".equals(mimetype)) {
            docType = HTML;
        } else if ("application/pdf".equals(mimetype)) {
View Full Code Here


        }
        return parser;
    }
   
    private void parse() {
        IParser parser = getParser();
        if (null != parser) {
            try {
                String encoding = getEncoding();
                ParseOutput out = parser.parse(page.getUrl(), content, encoding);
                this.text = out.getText();
                this.title = out.getTitle();
                List<Pair<String,String>> ol = out.getLinks();
                links = new Link[ol.size()];
                int i = 0;
View Full Code Here

TOP

Related Classes of com.flaptor.util.parser.IParser

Copyright © 2018 www.massapicom. 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.