Package org.vietspider.common.io

Examples of org.vietspider.common.io.DataReader.load()


//    webClient.registryProxy("216.194.70.3", 8118, null, null);
   
    final DataWriter writer = new DataWriter();
    final DataReader reader = new DataReader();
    File file  = new File("F:\\Temp2\\webclient\\proxies.txt") ;
    String textValue  = new String(reader.load(file), "utf-8");
    String [] proxies = textValue.split("\n");
    File newFile  = new File("F:\\Temp2\\webclient\\good.proxies.txt") ;
  
    final File folder = new File("F:\\Temp2\\webclient\\proxy\\");
    deleteFolder(folder);
View Full Code Here


    return createDocument(reader.loadInputStream(input).toByteArray(), charset, decoder)
  }
 
  public static XMLDocument createDocument(File file, String charset, XMLDataDecoder decoder) throws Exception {
    DataReader reader = new DataReader();
    return createDocument(reader.load(file), charset, decoder);
  }
}
View Full Code Here

    return createDocument(reader.loadInputStream(input).toByteArray(), charset)
  }

  public HTMLDocument createDocument(File file, String charset) throws Exception {
    DataReader reader = new DataReader();
    return createDocument(reader.load(file), charset);
  }

}
View Full Code Here

    if(charset != null && charset.trim().length() < 1) charset = null;
  }
 
  public HTMLDocument loadDocument(File file) throws Exception {
    DataReader reader = new DataReader();
    byte [] bytes = reader.load(file);
    return charset != null ? createDocument(bytes, charset) : detectDocument(bytes);
 
 
  public HTMLDocument createDocument(byte [] bytes) throws Exception {
    if(charset != null) {
View Full Code Here

  }

  @Deprecated()
  public static HTMLDocument createDocument(File file, String charset) throws Exception {
    DataReader reader = new DataReader();
    return createDocument(reader.load(file), charset);
 

  @Deprecated()
  public static String detect(byte [] buf){
    nsDetector det = new nsDetector(nsPSMDetector.ALL) ;
View Full Code Here

    file = new File(url.toURI());

    System.out.println(file.getPath());
    System.out.println("*********************************************************");
    DataReader buffer = new DataReader();
    String text = new String(buffer.load(file), "utf-8");
    CharsToken tokens = new CharsToken();
    TokenParser tokenParser = new TokenParser();
    tokenParser.createBeans(tokens, text.toCharArray());
    while(tokens.hasNext()){
      NodeImpl node = tokens.pop();
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.