Android examples for File Input Output:Byte Array Convert
MAC Address String To Byte Array
//package com.book2s; public class Main { public static byte[] MACStringToByteArray(String address) { String[] addrs = address.split(":"); byte[] mac_bytes = new byte[6]; for (int i = 0; i < addrs.length; i++) { mac_bytes[i] = Integer.decode("0x" + addrs[i]).byteValue(); }//from w w w . j a va2s .c o m return mac_bytes; } }