sonic-java/apidocs/com/github/tencent/SonicUtil.html
com.github.tencent
public classSonicUtilextends[Object](http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true "java.lang中的类或接口")
构造器 | 构造器和说明 |
| --- |
| 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匹配的字符串替换掉
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public SonicUtil()
-
public static[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")hex(byte[] arr)
返回十六进制字符串
参数:arr - 返回:
-
public static[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")encrypt([String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")inputText,[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")algorithmName)
参数:inputText - algorithmName - 返回:
-
public static[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")replaceAllCallBack([String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")string,[Pattern](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html?is-external=true "java.util.regex中的类或接口")pattern,[ReplaceCallBack](../../../com/github/tencent/ReplaceCallBack.html "com.github.tencent中的接口")replacement)
将String中的所有pattern匹配的字符串替换掉
参数:string - 待替换的字符串pattern - 替换查找的正则表达式对象replacement - 替换函数返回:
-
public static[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")pregMatch([String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")strContent,[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")strPattern)
-
public static[Map](http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true "java.util中的类或接口")<[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口"),[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")> getAllHttpHeaders(javax.servlet.http.HttpServletRequest httpRequest)
获取HTTP所有的请求头
参数:httpRequest - 返回:
Copyright © 2018. All rights reserved.