public class ByteUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static byte[] |
EMPTY_BYTE_ARRAY |
| 构造器和说明 |
|---|
ByteUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
hexStringToBytes(String data)
Converts string hex representation to data bytes
Accepts following hex:
- with or without 0x prefix
- with no leading 0, like 0xabc -> 0x0abc
|
static String |
toHexString(byte[] data)
Convert a byte-array into a hex String.
|
public static String toHexString(byte[] data)
Hex.toHexString(byte[])
but allows for nulldata - - byte-array to convert to a hex-stringnullHex.toHexString(byte[])public static byte[] hexStringToBytes(String data)
data - String like '0xa5e..' or just 'a5e..'Copyright © 2022. All rights reserved.