response.java

来自「爬虫数据的改进,并修正了一些bug」· Java 代码 · 共 38 行

JAVA
38
字号
/* Copyright (c) 2004 The Nutch Organization.  All rights reserved.   */
/* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */

package net.nutch.net.protocols;

import java.net.URL;


/** A response inteface.  Makes all protocols model HTTP. */

public interface Response {

  /** Returns the URL used to retrieve this response. */
  public URL getUrl();

  /** Returns the response code. */
  public int getCode();

  /** Returns the value of a named header. */
  public String getHeader(String name);

  /** Returns the full content of the response. */
  public byte[] getContent();

  /** 
   * Returns the compressed version of the content if the server
   * transmitted a compressed version, or <code>null</code>
   * otherwise. 
   */
  public byte[] getCompressedContent();

  /**
   * Returns the number of 100/Continue headers encountered 
   */
  public int getNumContinues();

}

⌨️ 快捷键说明

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