public class CodecUtil extends Object
| 构造器和说明 |
|---|
CodecUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
decodeBase64(String input)
Base64解码.
|
static byte[] |
decodeBase64(String input,
Charset charset)
Base64解码.
|
static String |
decodeBase64String(String input)
Base64解码.
|
static String |
decodeBase64String(String input,
Charset charset)
Base64解码.
|
static byte[] |
decodeHex(String input)
Hex解码.
|
static String |
encodeBase64(byte[] bytes)
Base64编码.
|
static String |
encodeBase64(byte[] bytes,
Charset charset)
Base64编码.
|
static String |
encodeBase64(String input)
Base64编码.
|
static String |
encodeBase64(String input,
Charset charset)
Base64编码.
|
static String |
encodeHex(byte[] input)
Hex编码.
|
static String |
escapeHtml(String html)
HTML 转码.
|
static String |
escapeXml(String xml)
XML 转码.
|
static String |
toHex(byte[] digest)
将签名值转为 16进制,并且缺位补 0
效果同 encodeHex()
|
static String |
unescapeHtml(String htmlEscaped)
HTML 解码.
|
static String |
unescapeXml(String xmlEscaped)
XML 解码.
|
static String |
urlDecode(String part)
URL 解码, Encode默认为UTF-8.
|
static String |
urlDecode(String part,
String charsetName)
URL 解码, Encode默认为UTF-8.
|
static String |
urlEncode(String part)
URL 编码, Encode默认为UTF-8.
|
static String |
urlEncode(String part,
String charsetName)
URL 编码, Encode默认为UTF-8.
|
public static final String UTF8_NAME
public static final Charset UTF8
public static String toHex(byte[] digest)
digest - 签名值public static String encodeHex(byte[] input)
public static byte[] decodeHex(String input)
public static String encodeBase64(byte[] bytes)
public static byte[] decodeBase64(String input)
Copyright © 2024. All rights reserved.