|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CachedResource
A interface for cached resources.
Method Summary | |
---|---|
void |
copyHeadersTo(javax.servlet.http.HttpServletResponse res,
boolean gzipped)
Copy the headers to the HTTP servlet response. |
byte[] |
getBody(boolean gzipped)
Returns the body content as bytes. |
String |
getContentType()
|
String |
getETag(boolean gzipped)
Returns the etag for this resource. |
List<HttpHeader<? extends Serializable>> |
getHeaders(boolean gzipped)
|
long |
getLastModified()
Returns the last modified date for this resource. |
int |
getStatusCode()
|
boolean |
hasContent()
|
boolean |
hasGzippedBody()
|
boolean |
isOK()
Returns true if the response is OK (200). |
Method Detail |
---|
String getContentType()
int getStatusCode()
byte[] getBody(boolean gzipped) throws IOException
If the content is gzippable, this method will unzip the content on demand.
If the content is not gzippable, this method will trown a
gzipped
- true
to request the gzipped content;
false
to get the raw content.
IOException
- if thrown while ungzipping the content.boolean hasContent()
true
if the body is not null
and would not result in a 0-length content.boolean hasGzippedBody()
true
if there is a non null
gzipped bodyboolean isOK()
true
if the response is OK (200).
true
if the status code is 200;
false
for any other code.long getLastModified()
String getETag(boolean gzipped)
gzipped
- true
to get the etag for a gzipped content;
false
to get the etag for raw content.
null
otherwise.List<HttpHeader<? extends Serializable>> getHeaders(boolean gzipped)
gzipped
- true
if the content is sent gzipped;
false
otherwise.
void copyHeadersTo(javax.servlet.http.HttpServletResponse res, boolean gzipped)
res
- The HTTP servlet response where the headers should be copied.gzipped
- true
if the content is sent gzipped;
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |