public class ServletUtil extends Object
| 构造器和说明 |
|---|
ServletUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
date2string(long date) |
static void |
decodeByUrl(LinkedMultiValueMap<String,String> parameterMap,
String uri,
Charset charset) |
static void |
decodeByUrl(Map<String,String[]> sourceParameterMap,
String uri,
Charset charset) |
static String |
decodeCharacterEncoding(String contentType) |
static Cookie[] |
decodeCookie(String header)
Decodes the specified Set-Cookie HTTP header value into a
|
static String |
encodeCookie(String cookieName,
String cookieValue,
int maxAge,
String path,
String domain,
boolean secure,
boolean httpOnly)
Encodes the specified cookie into a Set-Cookie header value.
|
static String |
getCookieValue(Cookie[] cookies,
String cookieName) |
static String |
getDateByRfcHttp() |
static ServletHttpServletRequest |
unWrapper(javax.servlet.ServletRequest request)
unWrapper
|
static ServletHttpServletResponse |
unWrapper(javax.servlet.ServletResponse response)
unWrapper
|
public static String getDateByRfcHttp()
public static String date2string(long date)
public static void decodeByUrl(LinkedMultiValueMap<String,String> parameterMap, String uri, Charset charset)
public static void decodeByUrl(Map<String,String[]> sourceParameterMap, String uri, Charset charset)
public static String encodeCookie(String cookieName, String cookieValue, int maxAge, String path, String domain, boolean secure, boolean httpOnly)
cookieName - cookieNamecookieValue - cookieValuemaxAge - maxAgepath - pathdomain - domainsecure - securehttpOnly - httpOnlypublic static Cookie[] decodeCookie(String header)
header - headerCookiepublic static ServletHttpServletResponse unWrapper(javax.servlet.ServletResponse response)
response - responsepublic static ServletHttpServletRequest unWrapper(javax.servlet.ServletRequest request)
request - requestCopyright © 2021. All rights reserved.