org.supermind.crawl.http
Class HttpResponse

java.lang.Object
  extended by org.supermind.crawl.http.HttpResponse

public class HttpResponse
extends java.lang.Object


Field Summary
protected  java.util.Map<java.lang.String,java.lang.Integer> codes
          Map of url to response code.
(package private) static java.lang.String HTTP_CONTENT_ENCODING
           
(package private) static java.lang.String HTTP_CONTENT_TYPE
           
(package private) static java.lang.String HTTP_TRANSFER_ENCODING
           
(package private) static java.util.Map<java.lang.String,java.lang.Byte> serverHttpVersion
          Map of host name to http version.
(package private) static byte VERSION_1_0
           
(package private) static byte VERSION_1_1
           
 
Constructor Summary
HttpResponse()
           
 
Method Summary
 org.apache.nutch.protocol.Content[] get(java.lang.String[] origs, java.net.URL[] urls)
          URLs MUST have the same host.
 org.apache.nutch.protocol.Content get(java.lang.String originalurl, java.net.URL url)
           
 int getCode(java.lang.String url)
          Returns the response code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codes

protected java.util.Map<java.lang.String,java.lang.Integer> codes
Map of url to response code.


HTTP_CONTENT_ENCODING

static final java.lang.String HTTP_CONTENT_ENCODING
See Also:
Constant Field Values

HTTP_CONTENT_TYPE

static final java.lang.String HTTP_CONTENT_TYPE
See Also:
Constant Field Values

HTTP_TRANSFER_ENCODING

static final java.lang.String HTTP_TRANSFER_ENCODING
See Also:
Constant Field Values

serverHttpVersion

static java.util.Map<java.lang.String,java.lang.Byte> serverHttpVersion
Map of host name to http version.


VERSION_1_0

static final byte VERSION_1_0
See Also:
Constant Field Values

VERSION_1_1

static final byte VERSION_1_1
See Also:
Constant Field Values
Constructor Detail

HttpResponse

public HttpResponse()
Method Detail

get

public org.apache.nutch.protocol.Content[] get(java.lang.String[] origs,
                                               java.net.URL[] urls)
URLs MUST have the same host.

Parameters:
origs -
urls -
Returns:
Throws:
java.io.IOException
HttpException

get

public org.apache.nutch.protocol.Content get(java.lang.String originalurl,
                                             java.net.URL url)
                                      throws HttpException,
                                             java.io.IOException
Throws:
HttpException
java.io.IOException

getCode

public int getCode(java.lang.String url)
Returns the response code.