code: public ArrayList<InetAddress> getLocalAddresses()
    {
      synchronized (_addressCache) {
        ArrayList<InetAddress> localAddresses = _addressCache.get("addresses");
        
        if (localAddresses == null) {
          localAddresses = new ArrayList<InetAddress>();
          
          try {
            for (NetworkInterfaceBase iface : getNetworkInterfaces()) {
              for (InetAddress addr : iface.getInetAddresses()) {
                localAddresses.add(addr);
              }
            }
            
            Collections.sort(localAddresses, new LocalIpCompare());
            
            _addressCache.put("addresses", localAddresses);
          } catch (Exception e) {
            log.log(Level.WARNING, e.toString(), e);
          } finally {
            _addressCache.put("addresses", localAddresses);
          }
        }
        
        return new ArrayList<>(localAddresses);
      }
    }
docs: Returns the InetAddresses for the local machine.