Package org.apache.kerby.xdr.util
Class HexUtil
java.lang.Object
org.apache.kerby.xdr.util.HexUtil
This is only for test, be careful when use in production codes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbytesToHex(byte[] bytes) Convert bytes into format as: 02020080static StringbytesToHexFriendly(byte[] bytes) Convert bytes into friendly format as: 0x02 02 00 80static byte[]Convert hex string like follows into byte array 02020080static byte[]hex2bytesFriendly(String hexString) Convert friendly hex string like follows into byte array 0x02 02 00 80
-
Constructor Details
-
HexUtil
public HexUtil()
-
-
Method Details
-
bytesToHexFriendly
Convert bytes into friendly format as: 0x02 02 00 80- Parameters:
bytes- The bytes to be converted
-
hex2bytesFriendly
Convert friendly hex string like follows into byte array 0x02 02 00 80- Parameters:
hexString-
-
bytesToHex
Convert bytes into format as: 02020080- Parameters:
bytes- The bytes- Returns:
- The hex string
-
hex2bytes
Convert hex string like follows into byte array 02020080- Parameters:
hexString- The hex string- Returns:
- The bytes
-