public class HostnameUtil extends Object
| Constructor and Description |
|---|
HostnameUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getHostname() |
static Set<String> |
getHostnames(String address)
Given an address resolve it to as many unique addresses or hostnames as can be found.
|
static Set<String> |
getHostnames(String address,
boolean includeLoopback)
Given an address resolve it to as many unique addresses or hostnames as can be found.
|
public static String getHostname()
public static Set<String> getHostnames(String address)
address - the address to resolve.address.public static Set<String> getHostnames(String address, boolean includeLoopback)
address - the address to resolve.includeLoopback - if true loopback addresses will be included in the returned set.address.Copyright © 2018. All rights reserved.