|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.util.ServletUtils
public class ServletUtils
Utility class for working with servlet container objects, such as HttpServletRequest
and HttpServletResponse
.
Method Summary | |
---|---|
static java.lang.String |
getEtag(byte[] bytes)
Generates an Etag given a byte array. |
static java.lang.String |
getEtag(long size)
Generates an Etag given a file size. |
static java.lang.String |
getServletPath(javax.servlet.http.HttpServletRequest request)
Returns the servlet path of a request. |
static boolean |
isModified(javax.servlet.http.HttpServletRequest request,
byte[] bytes,
long modified)
Checks to see if the request script has been modified since the last time the given browser has requested the script based on the 'If-Modified-Since' and 'If-None-Match' headers. |
static boolean |
isModified(javax.servlet.http.HttpServletRequest request,
long fileSize,
long modified)
Checks to see if the request script has been modified since the last time the given browser has requested the script based on the 'If-Modified-Since' and 'If-None-Match' headers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getServletPath(javax.servlet.http.HttpServletRequest request)
HttpServletRequest.getServletPath()
, so this function tries a few methods to get the same information.
request
- the HttpServletRequest
to get the path information from.
public static boolean isModified(javax.servlet.http.HttpServletRequest request, byte[] bytes, long modified)
getEtag(byte[])
and lastmodified (which is the server startup).
request
- the request to get the headers frombytes
- the bytes to check for modificationsmodified
- the last time the script was modified
public static boolean isModified(javax.servlet.http.HttpServletRequest request, long fileSize, long modified)
getEtag(byte[])
and lastmodified (which is the server startup).
request
- the request to get the headers fromfileSize
- the fileSize to compute the etag withmodified
- the last time the script was modified
public static java.lang.String getEtag(byte[] bytes)
bytes
- the bytes value of a script to compute an Etag for
public static java.lang.String getEtag(long size)
size
- the file size to compute an Etag for
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |