Here you can find the source of byte2Mac(final byte[] m)
public static String byte2Mac(final byte[] m)
//package com.java2s; // Licensed to the Apache Software Foundation (ASF) under one import java.util.Formatter; public class Main { public static String byte2Mac(final byte[] m) { final StringBuilder result = new StringBuilder(17); final Formatter formatter = new Formatter(result); formatter.format("%02x:%02x:%02x:%02x:%02x:%02x", m[0], m[1], m[2], m[3], m[4], m[5]);//from www . j a v a 2 s. co m formatter.close(); return result.toString(); } }