public class Ethers extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Ethers.MacAddressNotFound |
| Modifier and Type | Field and Description |
|---|---|
static String |
defaultPathname |
| Modifier and Type | Method and Description |
|---|---|
static String |
getEtherAddress(String hostname) |
static String |
getEtherAddress(String hostname,
File ethersPathname) |
String |
getMac(String hostname)
Returns MAC address.
|
String |
getMacOrNull(String hostname)
Returns MAC address.
|
static void |
main(String[] args)
Command line interface to getMac.
|
public static final String defaultPathname
public Ethers(File file) throws IOException
IOExceptionpublic Ethers()
throws IOException
IOExceptionpublic static String getEtherAddress(String hostname, File ethersPathname) throws Ethers.MacAddressNotFound, IOException
Ethers.MacAddressNotFoundIOExceptionpublic static String getEtherAddress(String hostname) throws IOException, Ethers.MacAddressNotFound
IOExceptionEthers.MacAddressNotFoundpublic static void main(String[] args)
args - hostname to be resolvedpublic String getMacOrNull(String hostname)
hostname - public String getMac(String hostname) throws Ethers.MacAddressNotFound
hostname - Ethers.MacAddressNotFoundCopyright © 2020. All rights reserved.