get Manufactory from mac address - Android java.net

Android examples for java.net:Mac Address

Description

get Manufactory from mac address

Demo Code


public class Main{


    public static String getManufactory(String mac) {
        if (mac == null)
            return null;

        String[] m = mac.split(":");
        if (m.length < 3)
            return null;

        String manufactory = String.format("%s-%s-%s", m[0], m[1], m[2]);
        return manufactory;
    }/*from   w w  w  .j a v a2 s  .c  o  m*/

}

Related Tutorials