(String name)
| 34 | } |
| 35 | |
| 36 | public static InetAddress getByName(String name) throws UnknownHostException { |
| 37 | try { |
| 38 | Socket.init(); |
| 39 | return new InetAddress(name); |
| 40 | } catch (IOException e) { |
| 41 | UnknownHostException uhe = new UnknownHostException(name); |
| 42 | uhe.initCause(e); |
| 43 | throw uhe; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | public byte[] getAddress() { |
| 48 | byte[] res = new byte[4]; |