public final class NetUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getLocalAddress()
Retrieve local address
|
static InetAddress |
getLocalInetAddress()
Retrieve the first validated local ip address(the Public and LAN ip addresses are validated).
|
public static InetAddress getLocalInetAddress() throws SocketException
SocketException - the socket exceptionpublic static String getLocalAddress()
Copyright © 2023. All rights reserved.