SMILA 1.0 API documentation

org.eclipse.smila.connectivity.framework.crawler.web.http
Class HttpResponse

java.lang.Object
  extended by org.eclipse.smila.connectivity.framework.crawler.web.http.HttpResponse
All Implemented Interfaces:
Response, HttpHeaders

public class HttpResponse
extends java.lang.Object
implements Response

Retrieves page checks content-type filters and performs HTML form authentication if needed.


Field Summary
 
Fields inherited from interface org.eclipse.smila.connectivity.framework.crawler.web.metadata.HttpHeaders
CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_TYPE, LAST_MODIFIED, LOCATION
 
Constructor Summary
HttpResponse(HttpBase http, java.lang.String urlString, FilterProcessor filterProcessor)
          Creates new object and fills it with retrieved URL information.
 
Method Summary
 int getCode()
          Returns the response code.
 byte[] getContent()
          Returns the full content of the response.
 java.lang.String getHeader(java.lang.String name)
          Returns the value of a named header.
 Metadata getHeaders()
          Returns all the headers.
 java.lang.String getUrl()
          Returns the URL used to retrieve this response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpResponse

public HttpResponse(HttpBase http,
                    java.lang.String urlString,
                    FilterProcessor filterProcessor)
             throws java.io.IOException
Creates new object and fills it with retrieved URL information.

Parameters:
http - HTTP protocol options HTTP to retrieve
filterProcessor - filters to perform
urlString - the url string
Throws:
java.io.IOException - if error while retrieving URL occur
Method Detail

getUrl

public java.lang.String getUrl()
Returns the URL used to retrieve this response.

Specified by:
getUrl in interface Response
Returns:
String URL string

getCode

public int getCode()
Returns the response code.

Specified by:
getCode in interface Response
Returns:
code

getHeader

public java.lang.String getHeader(java.lang.String name)
Returns the value of a named header.

Specified by:
getHeader in interface Response
Parameters:
name - Header name
Returns:
String

getHeaders

public Metadata getHeaders()
Returns all the headers.

Specified by:
getHeaders in interface Response
Returns:
Metadata

getContent

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

Specified by:
getContent in interface Response
Returns:
byte array

SMILA 1.0 API documentation