|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxinmy.weixin4j.util.ServerToolkits
public final class ServerToolkits
工具包
| Field Summary | |
|---|---|
static String |
AES
|
static String |
CONTENTTYPE$APPLICATION_XML
|
static String |
CONTENTTYPE$TEXT_PLAIN
|
static io.netty.util.AttributeKey<WeixinMessageTransfer> |
MESSAGE_TRANSFER_KEY
|
static String |
PROTOCOL_FILE
|
static String |
PROTOCOL_JAR
|
static String |
SHA1
|
static Charset |
UTF_8
|
| Constructor Summary | |
|---|---|
ServerToolkits()
|
|
| Method Summary | |
|---|---|
static String |
digestSHA1(String content)
SHA1签名 |
static String |
generateRandomString(int length)
返回一个定长的随机字符串(包含数字和大小写字母) |
static byte[] |
getBytesUtf8(String content)
|
static boolean |
isBlank(CharSequence cs)
判断字符串是否为空 |
static void |
makeConstructorAccessible(Constructor<?> ctor)
构造器设置为可见 |
static String |
newStringUtf8(byte[] bytes)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Charset UTF_8
public static final String AES
public static final String SHA1
public static final String PROTOCOL_FILE
public static final String PROTOCOL_JAR
public static final String CONTENTTYPE$APPLICATION_XML
public static final String CONTENTTYPE$TEXT_PLAIN
public static final io.netty.util.AttributeKey<WeixinMessageTransfer> MESSAGE_TRANSFER_KEY
| Constructor Detail |
|---|
public ServerToolkits()
| Method Detail |
|---|
public static String generateRandomString(int length)
length - 随机数的长度
public static void makeConstructorAccessible(Constructor<?> ctor)
ctor - public static String digestSHA1(String content)
content - 待签名字符串
public static byte[] getBytesUtf8(String content)
public static String newStringUtf8(byte[] bytes)
public static boolean isBlank(CharSequence cs)
cs -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||