public class RequestUtils
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
CRLF |
限定符 | 构造器和说明 |
---|---|
private |
RequestUtils() |
限定符和类型 | 方法和说明 |
---|---|
static javax.servlet.http.Cookie |
addCookie(java.lang.String contextPath,
java.lang.String schema,
javax.servlet.http.HttpServletResponse response,
java.lang.String name,
java.lang.String value,
java.lang.Integer expiry,
java.lang.String domain) |
static void |
cancleCookie(java.lang.String contextPath,
java.lang.String schema,
javax.servlet.http.HttpServletResponse response,
java.lang.String name,
java.lang.String domain) |
static java.lang.String |
getAccept(javax.servlet.http.HttpServletRequest request) |
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.Cookie[] cookies,
java.lang.String name) |
static java.lang.String |
getEncodePath(java.lang.String path,
java.lang.String queryString)
获取转码路径
|
static java.lang.String |
getIpAddress(javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
getUserAgent(javax.servlet.http.HttpServletRequest request)
获取UserAgent
|
static java.lang.String |
getValue(java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.lang.String key) |
static java.lang.String |
removeCRLF(java.lang.String string) |
static void |
removeCRLF(java.lang.String[] values) |
public static final java.lang.String CRLF
public static java.lang.String getValue(java.util.Map<java.lang.String,java.lang.String[]> parameterMap, java.lang.String key)
parameterMap
- key
- public static java.lang.String getEncodePath(java.lang.String path, java.lang.String queryString)
path
- queryString
- public static java.lang.String removeCRLF(java.lang.String string)
string
- public static void removeCRLF(java.lang.String[] values)
values
- public static java.lang.String getUserAgent(javax.servlet.http.HttpServletRequest request)
request
- public static java.lang.String getAccept(javax.servlet.http.HttpServletRequest request)
request
- public static javax.servlet.http.Cookie getCookie(javax.servlet.http.Cookie[] cookies, java.lang.String name)
cookies
- name
- public static javax.servlet.http.Cookie addCookie(java.lang.String contextPath, java.lang.String schema, javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value, java.lang.Integer expiry, java.lang.String domain)
contextPath
- schema
- response
- name
- value
- expiry
- domain
- public static void cancleCookie(java.lang.String contextPath, java.lang.String schema, javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String domain)
contextPath
- schema
- response
- name
- domain
- public static java.lang.String getIpAddress(javax.servlet.http.HttpServletRequest request)
request
-