Class NetUtil


  • public class NetUtil
    extends Object
    • Method Detail

      • getLocalHostAddress

        public static String getLocalHostAddress()
        Returns:
        Machine's IP address
      • getLocalHostName

        public static String getLocalHostName()
        Returns:
        Machine's host name. This method can be better to call than getting it off getLocalHost() because sometimes the external address returned by that function does not have a useful hostname attached to it. This function will make sure a good value is returned.