Java Mac Address Get getMacAddressBytes()

Here you can find the source of getMacAddressBytes()

Description

get Mac Address Bytes

License

LGPL

Declaration

public static byte[] getMacAddressBytes() throws IOException 

Method Source Code

//package com.java2s;

import java.io.IOException;

import java.net.InetAddress;
import java.net.NetworkInterface;

public class Main {
    public static byte[] getMacAddressBytes() throws IOException {
        final NetworkInterface ni = NetworkInterface.getByInetAddress(InetAddress.getLocalHost());
        return ni.getHardwareAddress();
    }/* w  w  w .j  ava  2 s. co  m*/
}

Related

  1. getMacAddress()
  2. getMACAddress()
  3. getMacAddress(String host)
  4. getMACAddress(String interfaceName)
  5. getMacAddress(String separator)
  6. getMacAddresses()
  7. getMacAddressString()
  8. getMacAddrs()
  9. GetMachineAddress()