public abstract class NetUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static InetAddress |
localAddress
Pre-loaded local address
|
| 构造器和说明 |
|---|
NetUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 localAddress
public static InetAddress getLocalInetAddress() throws SocketException
SocketException - the socket exceptionpublic static String getLocalAddress()
Copyright © 2020. All rights reserved.