Package org.savantbuild.lang
Class StringTools
java.lang.Object
org.savantbuild.lang.StringTools
This is a toolkit with String helper methods.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StringTools
public StringTools()
-
-
Method Details
-
fromHex
Converts the contents of the given String from hexadecimal to an array of bytes. Each character of the String is a single hex value. Therefore, the pair of characters equals a single byte. This method is little-endian.- Parameters:
hexString- The hex String to convert- Returns:
- An array of bytes
-
toHex
Converts the contents of the given byte array from hexadecimal to a hex String. Each character of the String is a single hex value. Therefore, the the pair of characters equals a single byte.- Parameters:
hexBytes- The hex byte array to convert.- Returns:
- A hex String.
-