return (InetAddress[])list.toArray(new InetAddress[list.size()]);
return (byte[][])list.toArray(new byte[list.size()][]);
    public InetAddress[] getHostByName(String hostname)    throws UnknownHostException {                ArrayList list = null;        for (Iterator i = nlm.getNetworkLayers().iterator(); i.hasNext(); ) {            final NetworkLayer layer = (NetworkLayer)i.next();            final ProtocolAddress[] addrs = layer.getHostByName(hostname);            if (addrs != null) {                if (list == null) {                    list = new ArrayList();                }                final int cnt = addrs.length;                for (int j = 0; j < cnt; j++) {                    final ProtocolAddress pa = addrs[j];                    if (pa != null) {                        list.add(pa.toInetAddress());                    }                }            }        }        if (list == null) {            return null;        } else {            return (InetAddress[])list.toArray(new InetAddress[list.size()]);        }    }