net.java.sip.communicator.impl.netaddr
Class HardwareAddressRetriever
java.lang.Object
net.java.sip.communicator.impl.netaddr.HardwareAddressRetriever
public class HardwareAddressRetriever
- extends Object
Class to retrieve hardware address of a specific interface.
We know that starting Java 6, NetworkInterface has getHardwareAddress method
but as we still support Java 5 we have to do it ourself.
- Author:
- Sebastien Vincent
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HardwareAddressRetriever
public HardwareAddressRetriever()
getHardwareAddress
public static byte[] getHardwareAddress(String ifName)
- Returns the hardware address of a particular interface.
- Parameters:
ifName - name of the interface
- Returns:
- byte array representing the hardware address of the interface or
null if interface is not found or other system related errors
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.