|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--oracle.cabo.share.util.CaboHttpUtils
Utilities for working with HTTP.
| Method Summary | |
static java.lang.String[] |
decodeQValueString(java.lang.String string)
Given a string that uses q-value encodings, returns a sorted array of strings from most-preferred to least. |
static java.lang.String |
decodeRequestParameter(java.lang.String string,
java.lang.String encoding,
byte[] buffer)
Given a parameter string and the name of a character encoding, fixes the string. |
static java.util.Locale |
determineLocale(javax.servlet.ServletRequest request)
Returns the locale to be used for a request, based on Accept-Language and Accept-Charset HTTP
headers. |
static java.lang.String |
getFullServletPath(javax.servlet.http.HttpServletRequest httpRequest)
Returns the full servlet path: getRequestURI() - getPathInfo()
. |
static void |
setNoCacheHeaders(javax.servlet.http.HttpServletResponse response)
Sets headers on a servlet reponse to completely block caching for even the most poorly written browsers. |
static void |
validateEncoding(java.lang.String encoding)
Throws an UnsupportedEncodingException if the provided encoding is not supported. |
| 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 getFullServletPath(javax.servlet.http.HttpServletRequest httpRequest)
getRequestURI() - getPathInfo()
. In the Servlet 2.1 API, this is just getServletPath()
, but in Servlet 2.2, it's getContextPath() +
getServletPath(), hence the need for a utility method that
works in both versions.public static void setNoCacheHeaders(javax.servlet.http.HttpServletResponse response)
public static java.util.Locale determineLocale(javax.servlet.ServletRequest request)
Accept-Language and Accept-Charset HTTP
headers. Returns null if the locale cannot be determined.
public static void validateEncoding(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
encoding - the name of a character encoding
public static final java.lang.String decodeRequestParameter(java.lang.String string,
java.lang.String encoding,
byte[] buffer)
throws java.io.UnsupportedEncodingException
string - the stringencoding - the name of a character encodingbuffer - an optional byte buffer, for reuse; pass null
if you're not calling this function repeatedlypublic static java.lang.String[] decodeQValueString(java.lang.String string)
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||