Пример #1
0
 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);
   }
 }
Пример #2
0
 Inet6Address(String hostName, byte addr[], NetworkInterface nif) throws UnknownHostException {
   initif(hostName, addr, nif);
 }
Пример #3
0
 Inet6Address(String hostName, byte addr[]) {
   try {
     initif(hostName, addr, null);
   } catch (UnknownHostException e) {
   } /* cant happen if ifname is null */
 }