Back to Vassonic

SonicUtil (com.github.tencent:VasSonic 1.1 API)

sonic-java/apidocs/com/github/tencent/SonicUtil.html

3.1.15.4 KB
Original Source

跳过导航链接

com.github.tencent

类 SonicUtil


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匹配的字符串替换掉 |

- 

从类继承的方法 java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

构造器详细资料

- 

SonicUtil

public SonicUtil()

方法详细资料

- 

hex

public static[String](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true "java.lang中的类或接口")hex(byte[] arr)

返回十六进制字符串 参数:arr - 返回:

- 

encrypt

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 - 返回:

- 

replaceAllCallBack

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 - 替换函数返回:

- 

pregMatch

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)
- 

getAllHttpHeaders

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.