Class Util


  • public class Util
    extends Object
    Series of utility classes to perform various operations.
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • getAddr

        public static SocketAddress getAddr​(String hostline)
        Method to transform human readable addresses into usable address objects.
        Parameters:
        hostline - in the format of 'host:port'
        Returns:
        the constructed hostname + port.
      • hex

        public static String hex​(int i)
        Formats an integer as a hex value.
        Parameters:
        i - the integer to format
        Returns:
        the hex representation of the integer
      • unicode

        public static String unicode​(char c)
        Formats an char as a unicode value.
        Parameters:
        c - the character to format
        Returns:
        the unicode representation of the character
      • exception

        public static String exception​(Throwable t)
        Constructs a pretty one line version of a Throwable. Useful for debugging.
        Parameters:
        t - the Throwable to format.
        Returns:
        a string representing information about the Throwable
      • getUUID

        public static UUID getUUID​(String uuid)
        Converts a String to a UUID
        Parameters:
        uuid - The string to be converted
        Returns:
        The result