Java tutorial
//package com.java2s; public class Main { public static String toMacAddr(byte[] data) { if (data == null || data.length == 0) { return ""; } StringBuilder result = new StringBuilder(); for (byte b : data) { result.append(String.format("%02X:", b)); } return result.toString().substring(0, result.toString().length() - 1); } }