Class StringByteHelper
- java.lang.Object
-
- com.syntifi.casper.sdk.model.clvalue.encdec.StringByteHelper
-
public final class StringByteHelper extends java.lang.ObjectHelper methods for working with hex encoded string and bytes- Since:
- 0.0.1
- See Also:
CLTypeData
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringconvertBytesToHex(byte[] bytes)Helper method which returns byte arrays as hex stringsstatic byte[]hexStringToByteArray(java.lang.String hexString)Helper method which converts hex-encodedStringto byte arraystatic voidreverse(byte[] bytes)Reverses a byte array, used to go from little to big endianess
-
-
-
Method Detail
-
reverse
public static void reverse(byte[] bytes)
Reverses a byte array, used to go from little to big endianess- Parameters:
bytes- array of bytes to reverse
-
hexStringToByteArray
public static byte[] hexStringToByteArray(java.lang.String hexString) throws InvalidByteStringExceptionHelper method which converts hex-encodedStringto byte array- Parameters:
hexString- the hex-encodedStringto decode- Returns:
- decoded array of bytes
- Throws:
InvalidByteStringException
-
convertBytesToHex
public static java.lang.String convertBytesToHex(byte[] bytes)
Helper method which returns byte arrays as hex strings- Parameters:
bytes- the byte array to encode- Returns:
- hex-encoded value
String
-
-