Package sop.util
Class HexUtil
- java.lang.Object
-
- sop.util.HexUtil
-
public class HexUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description HexUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
bytesToHex(byte[] bytes)
Encode a byte array to a hex string.static byte[]
hexToBytes(java.lang.String s)
Decode a hex string into a byte array.
-
-
-
Method Detail
-
bytesToHex
public static java.lang.String bytesToHex(byte[] bytes)
Encode a byte array to a hex string.- Parameters:
bytes
-- Returns:
- See Also:
- How to convert a byte array to a hex string in Java?
-
hexToBytes
public static byte[] hexToBytes(java.lang.String s)
Decode a hex string into a byte array.- Parameters:
s
- hex string- Returns:
- decoded byte array
- See Also:
- Convert a string representation of a hex dump to a byte array using Java?
-
-