Package org.apache.activemq.util
Class HexSupport
- java.lang.Object
-
- org.apache.activemq.util.HexSupport
-
public final class HexSupport extends Object
Used to convert to hex from byte arrays and back.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
toBytesFromHex(String hex)
static String
toHexFromBytes(byte[] bytes)
static String
toHexFromInt(int value, boolean trim)
-
-
-
Method Detail
-
toBytesFromHex
public static byte[] toBytesFromHex(String hex)
- Parameters:
hex
-- Returns:
- array of bytes
-
toHexFromBytes
public static String toHexFromBytes(byte[] bytes)
- Parameters:
bytes
-- Returns:
- string hex value
-
toHexFromInt
public static String toHexFromInt(int value, boolean trim)
- Parameters:
value
-trim
- if the leading 0's should be trimmed off.- Returns:
- string hex value
-
-