Class StringUtil


  • public class StringUtil
    extends Object
    Utility class to manipulate strings
    • Method Detail

      • getHexString

        public static String getHexString​(byte[] raw)
        Method to convert byte array to hexadecimal string
        Parameters:
        raw - Raw byte array
        Returns:
        Hex string
      • passwordHash

        public static long passwordHash​(String password)
        Method to get the long hash from the password. This is used for seeding the random number generator
        Parameters:
        password - Password to hash
        Returns:
        Long hash of the password
      • isNullOrEmpty

        public static boolean isNullOrEmpty​(String val)
        Checks whether the given string is null or empty
        Parameters:
        val - Input string
        Returns:
        flag