addToCache(hostname, addresses);
  public static InetAddress[] getAllByName(String hostname)    throws UnknownHostException  {    SecurityManager s = System.getSecurityManager();    if (s != null)      s.checkConnect(hostname, -1);    InetAddress[] addresses;    // Default to current host if necessary    if (hostname == null)      {	addresses = new InetAddress[1];	addresses[0] = LOCALHOST;	return addresses;    }    // Check the cache for this host before doing a lookup    addresses = checkCacheFor(hostname);    if (addresses != null)      return addresses;    // Not in cache, try the lookup    byte[][] iplist = VMInetAddress.getHostByName(hostname);    if (iplist.length == 0)      throw new UnknownHostException(hostname);    addresses = new InetAddress[iplist.length];    for (int i = 0; i < iplist.length; i++)      {	if (iplist[i].length != 4)	  throw new UnknownHostException(hostname);	addresses[i] = new Inet4Address(iplist[i], hostname);      }    addToCache(hostname, addresses);    return addresses;    }