public class HexUtil extends Object
| Constructor and Description |
|---|
HexUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
bytesToHex(byte[] bytes)
Convert bytes into format as:
02020080
|
static String |
bytesToHexFriendly(byte[] bytes)
Convert bytes into friendly format as:
0x02 02 00 80
|
static byte[] |
hex2bytes(String hexString)
Convert hex string like follows into byte array
02020080
|
static byte[] |
hex2bytesFriendly(String hexString)
Convert friendly hex string like follows into byte array
0x02 02 00 80
|
public static String bytesToHexFriendly(byte[] bytes)
bytes - The bytes to be convertedpublic static byte[] hex2bytesFriendly(String hexString)
hexString - public static String bytesToHex(byte[] bytes)
bytes - The bytespublic static byte[] hex2bytes(String hexString)
hexString - The hex stringCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.