public class Hex extends Object
| 构造器和说明 |
|---|
Hex() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
decode(String hexStr)
Decode hexadecimal-encoded string and return raw byte array.
|
static String |
encode(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation.
|
static byte[] |
fromHex(String hexStr)
Decode hexadecimal-encoded string and return raw byte array.
|
static String |
toHex(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation.
|
public static String toHex(byte[] b, boolean leading0x)
b - Bytes to encode to hexadecimal representation.leading0x - If true, return with leading "0x".public static String encode(byte[] b, boolean leading0x)
toHex() method.b - Bytes to encode to hexadecimal representation.leading0x - If true, return with leading "0x".public static byte[] fromHex(String hexStr)
hexStr - Hexadecimal-encoded string, with or without leading "0x".public static byte[] decode(String hexStr)
fromHex() method.hexStr - Hexadecimal-encoded string, with or without leading "0x".Copyright © 2023. All rights reserved.