|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.constructs.web.PageInfo
public class PageInfo
A Serializable representation of a HttpServletResponse
.
Constructor Summary | |
---|---|
PageInfo(int statusCode,
java.lang.String contentType,
java.util.Collection headers,
java.util.Collection cookies,
byte[] body,
boolean storeGzipped)
Creates a PageInfo. |
Method Summary | |
---|---|
java.lang.String |
getContentType()
|
byte[] |
getGzippedBody()
|
java.util.List |
getHeaders()
Returns the headers of the response. |
java.util.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageInfo(int statusCode, java.lang.String contentType, java.util.Collection headers, java.util.Collection cookies, byte[] body, boolean storeGzipped) throws AlreadyGzippedException
statusCode
- contentType
- headers
- cookies
- body
- storeGzipped
- set this to false for images and page fragments which should never
be gzipped.
AlreadyGzippedException
Method Detail |
---|
public static boolean isGzipped(byte[] candidate)
>>14 beshort 0x677a (gzipped)
candidate
- the byte array to check
public java.lang.String getContentType()
public byte[] getGzippedBody()
public java.util.List getHeaders()
public java.util.List getSerializableCookies()
public int getStatusCode()
public byte[] getUngzippedBody() throws java.io.IOException
java.io.IOException
public boolean hasGzippedBody()
public boolean hasUngzippedBody()
public boolean isOk()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |