Package org.vietspider.html.util

Examples of org.vietspider.html.util.HTMLParserDetector.createDocument()


         
          if(html == null || html.trim().isEmpty()) {
            document = webClient.createDocument(refer, url, cache, detector);
          } else {
//            System.out.println(html);
            document = detector.createDocument(html);
          }
          if(charset == null) charset = detector.getCharset();
          removeIFrameSource(document.getRoot());
        } catch(Exception exp) {
          ClientLog.getInstance().setException(null, exp);
View Full Code Here


  }

  public HTMLDocument createDocument(byte[] data, String charset) throws Exception {
    if(charset == null) {
      HTMLParserDetector parserDetector = new HTMLParserDetector();
      return parserDetector.createDocument(data);
    }
    char [] chars = CharsDecoder.decode(charset, data, 0, data.length);
    return createDocument(chars);
 
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.