public class HttpResponse extends Object implements Response
CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_TYPE, LAST_MODIFIED, LOCATION, WRITABLE_CONTENT_TYPE
Constructor and Description |
---|
HttpResponse(HttpBase http,
URL url,
CrawlDatum datum)
Default public constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Returns the response code.
|
byte[] |
getContent()
Returns the full content of the response.
|
String |
getHeader(String name)
Returns the value of a named header.
|
Metadata |
getHeaders()
Returns all the headers.
|
URL |
getUrl()
Returns the URL used to retrieve this response.
|
public HttpResponse(HttpBase http, URL url, CrawlDatum datum) throws ProtocolException, IOException
http
- url
- datum
- ProtocolException
IOException
public URL getUrl()
Response
public int getCode()
Response
public String getHeader(String name)
Response
public Metadata getHeaders()
Response
getHeaders
in interface Response
public byte[] getContent()
Response
getContent
in interface Response
Copyright © 2014 The Apache Software Foundation