private void initstr(String hostName, byte addr[], String ifname) throws UnknownHostException { try { NetworkInterface nif = NetworkInterface.getByName(ifname); if (nif == null) { throw new UnknownHostException("no such interface " + ifname); } initif(hostName, addr, nif); } catch (SocketException e) { throw new UnknownHostException("SocketException thrown" + ifname); } }
Inet6Address(String hostName, byte addr[], NetworkInterface nif) throws UnknownHostException { initif(hostName, addr, nif); }
Inet6Address(String hostName, byte addr[]) { try { initif(hostName, addr, null); } catch (UnknownHostException e) { } /* cant happen if ifname is null */ }