code: public static String getDefaultIP(String strInterface)
      throws UnknownHostException {
      String[] ips = getIPs(strInterface);
      return ips[0];
    }
docs: Returns the first available IP address associated with the provided
  network interface
  
  @param strInterface
  The name of the network interface to query (e.g. eth0)
  @return The IP address in text form
  @throws UnknownHostException
  If one is encountered in querying the default interface