net.sf.ehcache.constructs.web
public class PageInfo extends Object implements Serializable
Version: $Id: PageInfo.java 80 2006-05-14 03:16:22Z gregluck $
Constructor Summary | |
---|---|
PageInfo(int statusCode, String contentType, Collection headers, Collection cookies, byte[] body, boolean storeGzipped)
Creates a PageInfo.
|
Method Summary | |
---|---|
String | getContentType() |
byte[] | getGzippedBody() |
List | getHeaders()
Returns the headers of the response. |
List | getSerializableCookies()
Returns the cookies of the response. |
int | getStatusCode()
Returns the status code of the response. |
byte[] | getUngzippedBody() |
boolean | hasGzippedBody() |
boolean | hasUngzippedBody() |
static boolean | isGzipped(byte[] candidate)
Checks the first two bytes of the candidate byte array for the magic number 0x677a.
|
boolean | isOk()
Returns true if the response is ok. |
Parameters: statusCode contentType headers cookies body storeGzipped set this to false for images and page fragments which should never be gzipped.
Returns: the content type of the response.
Returns: the gzipped version of the body if the content is storeGzipped, otherwise null
Returns: the ungzipped version of the body. This gunzipped on demand when storedGzipped, otherwise the ungzipped body is returned.
Returns: true if there is a non null gzipped body
Returns: true if there is a non null ungzipped body
>>14 beshort 0x677a (gzipped)
Parameters: candidate the byte array to check
Returns: true if gzipped, false if null, less than two bytes or not gzipped