# FetchedResult (Crawler-commons 0.6-SNAPSHOT API)
Date: 2015-05-26

crawlercommons.fetcher

## Class FetchedResult

- java.lang.Object
- - crawlercommons.fetcher.FetchedResult

    public class FetchedResult
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`FetchedResult(String baseUrl, String redirectedUrl, long fetchTime, org.apache.tika.metadata.Metadata headers, byte[] content, String contentType, int responseRate, Payload payload, String newBaseUrl, int numRedirects, String hostAddress, int statusCode, String reasonPhrase)`

### Method Summary

Methods
`String` `getBaseUrl()`
`byte[]` `getContent()`
`int` `getContentLength()`
`String` `getContentType()`
`String` `getFetchedUrl()`
`long` `getFetchTime()`
`org.apache.tika.metadata.Metadata` `getHeaders()`
`String` `getHostAddress()`
`String` `getNewBaseUrl()`
`int` `getNumRedirects()`
`Payload` `getPayload()`
`String` `getReasonPhrase()`
`int` `getResponseRate()`
`int` `getStatusCode()`
`String` `report()` Produces a neat report containing everything from a `FetchedResult` .
`void` `setPayload(Payload payload)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FetchedResult

    public FetchedResult(String baseUrl,
                 String redirectedUrl,
                 long fetchTime,
                 org.apache.tika.metadata.Metadata headers,
                 byte[] content,
                 String contentType,
                 int responseRate,
                 Payload payload,
                 String newBaseUrl,
                 int numRedirects,
                 String hostAddress,
                 int statusCode,
                 String reasonPhrase)

### Method Detail

#### getPayload

    public Payload getPayload()

#### setPayload

    public void setPayload(Payload payload)

#### getBaseUrl

    public String getBaseUrl()

#### getFetchedUrl

    public String getFetchedUrl()

#### getFetchTime

    public long getFetchTime()

#### getContent

    public byte[] getContent()

#### getContentLength

    public int getContentLength()

#### getContentType

    public String getContentType()

#### getResponseRate

    public int getResponseRate()

#### getHeaders

    public org.apache.tika.metadata.Metadata getHeaders()

#### getNewBaseUrl

    public String getNewBaseUrl()

#### getNumRedirects

    public int getNumRedirects()

#### getHostAddress

    public String getHostAddress()

#### getStatusCode

    public int getStatusCode()

#### getReasonPhrase

    public String getReasonPhrase()

#### report

    public String report()

Produces a neat report containing everything from a `FetchedResult` . The order of the report is based on the logical population of FetchedReport entities as per a non-public algorithm within `SimpleHttpFetcher`.

Returns:
  returns a String report of the FetchedResult.