public class SonicUtil extends Object
构造器和说明 |
---|
SonicUtil() |
限定符和类型 | 方法和说明 |
---|---|
static String |
encrypt(String inputText,
String algorithmName) |
static Map<String,String> |
getAllHttpHeaders(javax.servlet.http.HttpServletRequest httpRequest)
获取HTTP所有的请求头
|
static String |
hex(byte[] arr)
返回十六进制字符串
|
static String |
pregMatch(String strContent,
String strPattern) |
static String |
replaceAllCallBack(String string,
Pattern pattern,
ReplaceCallBack replacement)
将String中的所有pattern匹配的字符串替换掉
|
public static String hex(byte[] arr)
arr
- public static String encrypt(String inputText, String algorithmName)
inputText
- algorithmName
- public static String replaceAllCallBack(String string, Pattern pattern, ReplaceCallBack replacement)
string
- 待替换的字符串pattern
- 替换查找的正则表达式对象replacement
- 替换函数Copyright © 2018. All rights reserved.