title: What does InetAddress.isSiteLocalAddress() actually mean?
body: <p>Here is some code to determine the local host name that is supposed to work on a multi-homed box:</p>
  
  <pre><code> /**
   * Work out the first local host name by iterating the network interfaces
   * 
   * @return
   * @throws SocketException
   */
  private String findFirstLocalHostName() throws SocketException {
  
      Enumeration&lt;NetworkInterface&gt; ifaces = NetworkInterface.getNetworkInterfaces();
      while (ifaces.hasMoreElements()) {
          NetworkInterface iface = ifaces.nextElement();
          Enumeration&lt;InetAddress&gt; addresses = iface.getInetAddresses();
          while (addresses.hasMoreElements()) {
              InetAddress add = addresses.nextElement();
              if (!add.isLoopbackAddress() &amp;&amp; add.isSiteLocalAddress()) {
                  return add.getHostName();
              }
          }
      }
      throw new RuntimeException("Failed to determine local hostname");
  }
  </code></pre>
  
  <p>Does the call to isSiteLocalAddress introduce a bug? I can't find any useful information about this method, but I have a feeling that it relates to IP v 6 only and is deprecated.</p>