public class NetUtil extends Object
| Constructor and Description |
|---|
NetUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getLocalHostAddress() |
static String |
getLocalHostName() |
public static String getLocalHostAddress() throws UnknownHostException, SocketException
UnknownHostExceptionSocketExceptionpublic static String getLocalHostName() throws UnknownHostException, SocketException
getLocalHost() because sometimes the external address returned by that function does not have a useful hostname attached to it.
This function will make sure a good value is returned.UnknownHostExceptionSocketExceptionCopyright © 2022 Liquibase.org. All rights reserved.