Constructor and Description |
---|
HexUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
byteArrayToHexString(byte[] value)
Converts the given byte array into an hex string.
|
static String |
byteToHexString(byte value)
Converts the given byte into an hex string.
|
static boolean |
containsLetters(String parameter)
Checks whether the given parameter is a string or a numeric value.
|
static byte[] |
hexStringToByteArray(String value)
Converts the given hex string into a byte array.
|
static String |
integerToHexString(int value,
int minBytes)
Converts the given integer into an hexadecimal string.
|
static String |
prettyHexString(byte[] value)
Converts the given byte array into an hex string and retrieves it
in pretty format by splitting the content byte by byte.
|
static String |
prettyHexString(String hexString)
Converts the given hexadecimal string to a pretty format by splitting the
content byte by byte.
|
public HexUtils()
public static String byteArrayToHexString(byte[] value)
value
- Byte array to convert to hex string.NullPointerException
- if value == null
.hexStringToByteArray(String)
public static String byteToHexString(byte value)
value
- Byte to convert to hex string.public static boolean containsLetters(String parameter)
parameter
- Parameter to check.true
if the given parameter is a string,
false
otherwise.NullPointerException
- if parameter == null
.public static byte[] hexStringToByteArray(String value)
value
- Hex string to convert to byte array.NullPointerException
- if value == null
.byteArrayToHexString(byte[])
public static String integerToHexString(int value, int minBytes)
value
- The integer value to convert to hexadecimal string.minBytes
- The minimum number of bytes to be represented.public static String prettyHexString(byte[] value)
value
- The byte array to convert to pretty hex string.NullPointerException
- if value == null
.prettyHexString(String)
public static String prettyHexString(String hexString)
hexString
- The hexadecimal string to convert.NullPointerException
- if hexString == null
.prettyHexString(byte[])
© Copyright 2014–2014 Digi International Inc. All rights reserved.