Class Host

java.lang.Object
org.apache.jena.atlas.net.Host

public class Host extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Returns a host address, for what is most likely the machine's LAN IP address (not a loopback address, 127.0.0.x or ::1).
    Returns an InetAddress object encapsulating what is most likely the machine's LAN IP address (not a loopback address, 127.0.0.x or ::1).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Host

      public Host()
  • Method Details

    • getHostAddress

      public static String getHostAddress()
      Returns a host address, for what is most likely the machine's LAN IP address (not a loopback address, 127.0.0.x or ::1). If there is no other choice, it returns a local host address.
    • getLocalHostLANAddress

      public static InetAddress getLocalHostLANAddress()
      Returns an InetAddress object encapsulating what is most likely the machine's LAN IP address (not a loopback address, 127.0.0.x or ::1). If there is no other choice, it returns InetAddress.getLocalHost. Throw a runtime IO exception if no address choice found.