Here you can find the source of getMacAddressBytes()
public static byte[] getMacAddressBytes() throws IOException
//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*/ }