Class NetUtils


  • public final class NetUtils
    extends Object
    Networking-related convenience methods.
    • Method Detail

      • getLocalHostname

        public static String getLocalHostname()
        This method gets the network name of the machine we are running on. Returns "UNKNOWN_LOCALHOST" in the unlikely case where the host name cannot be found.
        Returns:
        String the name of the local host
      • toURI

        public static URI toURI​(String path)
        Converts a URI string or file path to a URI object.
        Parameters:
        path - the URI string or path
        Returns:
        the URI object