Package com.vonage.client.sms
Class HexUtil
java.lang.Object
com.vonage.client.sms.HexUtil
public class HexUtil extends java.lang.Object
Static helper methods for working with hex values.
-
Method Summary
Modifier and Type Method Description static java.lang.StringbytesToHex(byte[] bytes)translate a byte array of raw data into a String with a hex representation of that datastatic java.lang.StringbytesToHex(byte[] bytes, java.lang.String separator)translate a byte array of raw data into a String with a hex representation of that data.static byte[]hexToBytes(java.lang.String str)Converts a Hex encoded String into a byte vector.
-
Method Details
-
bytesToHex
translate a byte array of raw data into a String with a hex representation of that data- Parameters:
bytes- raw binary data- Returns:
- String Hex representation of the raw data
-
bytesToHex
translate a byte array of raw data into a String with a hex representation of that data. Each octet will be separated with a specific separator.- Parameters:
bytes- raw binary dataseparator- This string will be injected into the output in between each octet in the stream- Returns:
- String Hex representation of the raw data with each octet separated by 'separator'
-
hexToBytes
Converts a Hex encoded String into a byte vector.- Parameters:
str- The String to be encoded.- Returns:
- A byte vector representing the String.
-