⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httptoolcallback.java

📁 真正的网络爬虫的源代码啊,希望大家好好阅读,写出心得体会啊
💻 JAVA
字号:
package net.matuschek.http;

/*********************************************
    Copyright (c) 2001 by Daniel Matuschek
*********************************************/

/**
 * Callback interface to inform a frontend about the state of the
 * current HttpTool download operation
 *
 * @author Daniel Matuschek
 * @version $Id $
 */
public interface HttpToolCallback {

  /** 
   * After initiating a download, this method will be called to
   * inform about the URL that will be retrieved
   *  @param URL url that will be retrieved now
   */
  void setHttpToolDocUrl(String url);
  
  /** 
   * After HttpTool got a Content-Length header
   * this method will be called to inform about the size of
   * the document to retrieve
   * @param size document size in 
   */
  void setHttpToolDocSize(int size);
  

  /** 
   * after a block of bytes was read (default after every 1024 bytes,
   * this method will be called 
   * @param size the number of bytes that where retrieved 
   */
  void setHttpToolDocCurrentSize(int size);


  /** 
   * informs about the current status of the HttpTool 
   * @param status an integer describing the current status
   * constants defined in HttpTool
   * @see HttpTool
   */
  void setHttpToolStatus(int status);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -