public class HexUtil extends Object
Constructor and Description |
---|
HexUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
conventBytesToHexString(byte[] data)
Convert bytes to hex string.
|
static String |
convertBytesToHexString(byte[] data,
int offset,
int length)
Convert bytes to hex string value (using Big-Endian rule).
|
static byte[] |
convertHexStringToBytes(String hexString)
Convert the hex string to bytes.
|
static byte[] |
convertHexStringToBytes(String hexString,
int offset,
int endIndex)
Convert the hex string to bytes.
|
static String |
convertHexStringToString(String hexString)
Convert the hex string to string.
|
static String |
convertStringToHexString(String data)
Convert the string to hex string value.
|
public static String convertStringToHexString(String data)
data
- is case sensitive.public static String conventBytesToHexString(byte[] data)
data
- is the bytes.public static String convertBytesToHexString(byte[] data, int offset, int length)
data
- is the bytes.offset
- is the offset.length
- is the length.public static String convertHexStringToString(String hexString)
hexString
- is the hex string.public static byte[] convertHexStringToBytes(String hexString)
hexString
- is the hex string.public static byte[] convertHexStringToBytes(String hexString, int offset, int endIndex)
hexString
- is the hex string.offset
- is the offset.endIndex
- is the end index.